Thread (46 messages) 46 messages, 4 authors, 2012-06-29

Re: [RFC] Common code 09/12] slabs: Extract a common function for kmem_cache_destroy

From: Christoph Lameter <hidden>
Date: 2012-05-21 19:31:59

On Mon, 21 May 2012, Glauber Costa wrote:
On 05/21/2012 10:13 PM, Christoph Lameter wrote:
quoted
quoted
So unless I am missing something, it seems to me the correct code would
be:
quoted
 s->refcount--;
 if (!s->refcount)
      return kmem_cache_close;
 return 0;

 And while we're on that, that makes the sequence list_del() ->  if it
fails ->
quoted
 list_add() in the common kmem_cache_destroy a bit clumsy. Aliases will
be
quoted
 re-added to the list quite frequently. Not that it is a big problem,
but
quoted
 still...
True but this is just an intermediate step. Ultimately the series will
move sysfs processing into slab_common.c and then this is going away.
But until then, people bisecting into this patch will find a broken state,
right?
I thought this was about clumsiness not breakage. What is broken? Aliases
do not affect the call to __kmem_cache_shutdown. Its only called if there
are no aliases anymore.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help