lkml.org 
[lkml]   [2009]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] netfilter: use per-cpu recursive lock (v10)
    On Tue, Apr 21, 2009 at 08:41:36AM +1000, Paul Mackerras wrote:
    > Paul E. McKenney writes:
    >
    > > But a single CPU is acquiring one lock per CPU, so all the increments
    > > are to one CPU's preempt_count. :-(
    >
    > OK, I see, so a task can't take more than 255 spinlocks without
    > overflowing the preempt count, which seems a bit limiting.
    >
    > There are 6 free bits in the preempt_count currently, so the preempt
    > count could be expanded to 14 bits, which would be enough for all
    > current systems. Beyond that I guess we could make preempt_count be a
    > long and allow bigger counts on 64-bit architectures.

    Or we use the trick Eric suggested and Steve employed in the most recent
    patch. ;-)

    An alternative would be for the update code to acquire but one lock at a
    time, but this would likely require another lock to exclude other
    updaters and I believe would also require restructuring the count
    accumulation.

    So Steve's current patch seems a bit less intrusive, overall.

    Thanx, Paul


    \
     
     \ /
      Last update: 2009-04-21 01:49    [W:3.729 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site