Re: [patch 2.6.12-rc1-mm4] fork_connector: add a fork connector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 10, 2005 at 11:51:24PM -0700, Andrew Morton ([email protected]) wrote:
> Evgeniy Polyakov <[email protected]> wrote:
> >
> > On Sun, Apr 10, 2005 at 10:43:24PM -0700, Jay Lan ([email protected]) wrote:
> > > I based my listen program on the fclisten.c posted by Kaigai Kohei
> > > with my own modification. Unfortunately i lost my test machine in the
> > > lab. I will recreate the listen program Monday. The original listener
> > > did not validate sequence number. It also prints length of data and
> > > sequence number of every message it receives. My listener prints
> > > only out-of-sequence error messages.
> > > 
> > > The fork generator fork-test.c was yours? I called it fork-test
> > > and let it run continuously in while-loop:
> > > 
> > > # while 1
> > > # ./fork-test 10000000
> > > # sleep 1
> > > # end
> > > 
> > > I let it do 10,000,000 times of fork continuously while the system
> > > is running AIM7 and/or ubench.
> > > 
> > > The original fclisten.c and fork-test.c are attached for your reference.
> > 
> > It is pretty normal to see duplicated numbers in a fork test - 
> > I observed it too, since counter is incremented without locks
> > we can catch situation when it is incremented simultaneously 
> > on both processors, the latest version of the fork connector
> > from Guillaume contains processor id in the message and per cpu counters, 
> > so one can destinguish messages which sequence numbers will flow
> > in a very similar way now.
> 
> Oh come on, that's just daft.  Evgeniy, put a lock in there and fix it up.

#ifndef FAST_AND_SUSPICIOUS
	spin_lock(&fork_lock);
#endif
	seq++;
#ifndef FAST_AND_SUSPICIOUS
	spin_unlock(&fork_lock);
#endif

:)

-- 
	Evgeniy Polyakov ( s0mbre )
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux