lkml.org 
[lkml]   [2011]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V4 1/1] rcu: introduce kfree_rcu()
Date
On Tuesday 15 March 2011, Paul E. McKenney wrote:
> And it makes use of statically allocated structures a bit clunky.

How do statically allocated structures relate to this? I would
expect that you never call kfree_rcu on them, so it shouldn't
matter.

> Yet another approach is to use the low-order bit of the rcu_head pointer,
> given that the rcu_head structure does have to be aligned. If this bit
> is set, then the function pointer could be interpreted as an offset.
> This approach might also allow a slab_free_rcu() to be constructed, given
> that the full 32 bits of the function pointer would be available.
> For example, if the upper 16 bits are zero, the low-order 16 bits are
> the offset. If the upper 16 bits are 0x1, then the low-order 16 bits
> might be an index that selects the desired slab cache.

This solution sounds like a clear improvement over the patch that Lai
Jiangshan posted, without any downsides.

Arnd


\
 
 \ /
  Last update: 2011-03-15 14:09    [W:0.064 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site