Re: kqueue and device driver experience anyone ?

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Tue, 30 Aug 2011 07:44:12 +0200
On Mon, Aug 29, 2011 at 05:23:15PM -0700, John-Mark Gurney wrote:
> Luigi Rizzo wrote this message on Fri, Aug 26, 2011 at 23:01 +0200:
> > The other thing i need (but i believe i know how to handle it)
> > is tell whether .f_event() is called by KNOTE() or by kqueue_scan(),
> > but i believe i can use the "hint" argument to tell the two.
> 
> Why do you need to know the difference?  kqueue is a level triggered

because i want to control what gets executed in the lower and upper
half of the kernel, for two reasons:
- livelock/interrupt mitigation control. I want the bottom half to
  be as lightweight as possible so that the system does not get
  overwhelmed by incoming interrupts.
- reduced locking overhead. If the bottom half only notifies that
  'something happened', it  does not need to bother locking device
  specific data structures. For things like netmap this is especially
  useful because some data structures are shared between kernel and
  userland and the only way to protect access is make sure that the
  kernel only plays with them when it is in the upper half.

cheers
luigi
Received on Tue Aug 30 2011 - 03:29:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:17 UTC