Re: [PATCH/RFC] SPI: add async message handing library to David Brownell's core

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

 



On Wed, 2005-12-14 at 22:41 +0300, Vitaly Wool wrote:
> >Is this really true?  Is tasklet scheduling "harder" than kernal thread
> >scheduling?  A close look at my PXA SSP SPI implementation will reveal
> >that my design is nearly lock-less and callable from any execution
> >context (i.e. interrupt context).
> >  
> >
> It's harder in your case because the tasklet is created each time it's 
> scheduled again, as far as I see it in your impleemntation.
> Each SPI controller thread is created only once so it's more lightweight 
> than what you do.
> 
I'm not sure what you mean by "create".  The tasklet structures are
created and initialized once in the driver probe function.  I'm not an
expert but I looked into the implementation (softirq.c) of tasklets and
found the following design:

1) Tasklets are run by a softirq.
2) A softirq is really a kernel thread allocated on a per cpu basis.
3) A "scheduled" tasklet is simply a member of a link list maintained by
the softirq thread.

My driver implementation has the following features:

1) Uses only one kernel thread for all SPI controllers.
2) Reuses existing performance tuned kernel infrastructure (i.e.
tasklets)
3) Implements a low latency locking scheme for dispatching SPI transfers
via tasklet's serial scheduling guarantees.

IMHO, from a system load perspective, my approach is lighter and simpler
than adding a dedicated kernel thread for each SPI controller.

Stephen


-
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