Re: [PATCH 2.6] serialization of kernelcapi work

From: Armin Schindler
Date: Sat Mar 20 2004 - 17:25:22 EST


On Sat, 20 Mar 2004, Andrew Morton wrote:
> Armin Schindler <armin@xxxxxxxxxx> wrote:
> >
> > > However you are limiting things so only a single CPU can run `work to do'
> > > at any time, same as with a semaphore.
> >
> > Well, limiting the 'work to do' to one CPU is exactly what I need to do,
> > the code must not run on another CPU at the same time.
>
> Across the entire kernel? For *all* ISDN connections and interfaces?

Actually yes, for incoming messages.

> Surely there must be some finer-grained level at which the serialisation is
> needed - per-inteface, per-connection, per-session, whatever?

All incoming CAPI messages are queued in one global list and then the work
is scheduled. The recv_handler() is just a dispatcher, which dequeues all
new messages and puts them into the right queue for the application to read.

"the code must not run on another CPU at the same time" is not quite
correct. The code itself may run more than once of course, just the
dequeue-from-global-queue and put into application-queue sequence may
not run twice for the same application.

Armin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/