Re: Does the set operation on an Auto-Reset event make a waiter ready? (was: Producer at DPC,Consume

Thomas D, asked me to write couple notes for his website. I wrote four of
them, I think. Over the holiday shutdown I would like to cover the -
random nature of traffic, and how to think about performance (oops, pain)
points.

For now Ken answered the concern you brought up, and Anton stressed it also.

-pro

> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-434607-
> xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
> Sent: Thursday, December 16, 2010 9:06 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Producer at DPC,Consumer at helper thread,puzzled
>
> >
> > What makes it different from Max’s approach is that there are no idle
> invocations - if thread gets released it can be 100% sure that it will
> find at least one item to process (although it may contend for a
> spinlock). In Max’s implementation, N threads wake up and contend for a
> spinlock…and N-1 of them may go back to sleep without having done
> anything useful. This is particularly true if the load is low. This is
> what I would call
> > “thundering herd”. However, I don’t think this term applies to a
> situation when few workers may have to contend for a spinlock once in a
> while…
>
>
> Yes, Max’s code has thundering herd problem
>
> In your implementation, try to find the region of preemptions — There
> are two I noticed.
>
> I’ve 128 processor machine, with 128 Nic ports ( 64 cards ). Each
> 10Gbits… Observed capacity is around 7 to 8 Gbits/port. So 1GByte/s
> per port. So roughly 128 GBytes/sec or actual payload.
>
> Traffic is essentially random, I will take a burst that would occupy
> 128 processors at higher level than the worker threads.
>
> Calculate the worst case, what is the maximum I can put in in a Work
> item to indicate up.
>
> The synchronized event would be hammered then there is a pause in the
> traffic pattern, 128 worker threads will be scheduled back from
> preemption. One will win the race and break out of wait. Start
> processing - No one else will wake up…
>
> Now essentially I’ve a one processor machine to serve traffic.

As far as I’ve been able to follow this thread, Anton believes that
setting
an Auto-Reset event actually makes a thread ready as part of the Set()
operation, and Max and Pro believe it does not.

First, if that’s not really the difference of opinion, someone please set
me
straight.
Second, if that really is the issue, could someone who *knows* please
chime
in and confirm one or the other of the premises?

Once I figured out the difference of opinion, it became a useful
discussion.
Took me a while to figure out who was saying what, though. And I’m not
sure
I’ve got the differences really figured out.

Thanks,

Phil

Philip D. Barila (303) 776-1264


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer