lkml.org 
[lkml]   [2006]   [Nov]   [20]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 20 Nov 2006 21:13:35 +0100
FromJens Axboe <>
SubjectRe: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync
On Mon, Nov 20 2006, Alan Stern wrote:
> On Mon, 20 Nov 2006, Jens Axboe wrote:> > > On Mon, Nov 20 2006, Alan Stern wrote:> > > Paul:> > > > > > Here's my version of your patch from yesterday.  It's basically the same, 
> > > but I cleaned up the code in a few places and fixed a bug (the sign of idx 
> > > in srcu_read_unlock).  Also I changed the init routine back to void, since 
> > > it's no longer an error if the per-cpu allocation fails.
> > > > > > More importantly, I added a static initializer and included the fast-path 
> > > in synchronize_srcu.  It's protected by the new symbol 
> > > SMP__STORE_MB_LOAD_WORKS, which should be defined in arch-specific headers 
> > > for those architectures where the store-mb-load pattern is safe.> > > > Must we introduce memory allocations in srcu_read_lock()? It makes it
> > much harder and nastier for me to use. I'd much prefer a failing
> > init_srcu(), seems like a much better API.> > Paul agrees with you that allocation failures in init_srcu() should be 
> passed back to the caller, and I certainly don't mind doing so.
> > However we can't remove the memory allocation in srcu_read_lock().  That
> was the point which started this whole thread: the per-cpu allocation
> cannot be done statically, and some users of a static SRCU structure can't
> easily call init_srcu() early enough.> > Once the allocation succeeds, the overhead in srcu_read_lock() is minimal.

It's not about the overhead, it's about a potentially problematic
allocation.

-- 
Jens Axboe

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

\
 
 \ /
  Last update: 2006-11-20 20:17    [from the cache]
©2003-2008