Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Lai Jiangshan
Date: Thursday, March 18, 2010 - 9:13 pm

CC: Christoph Lameter <cl@linux-foundation.org>
CC: Pekka Enberg <penberg@cs.helsinki.fi>

I have written a patch like this before.

but SLUB opposed me, so I did not post it.

@ slub.c
static void free_slab(struct kmem_cache *s, struct page *page)
{
	if (unlikely(s->flags & SLAB_DESTROY_BY_RCU)) {
		/*
		 * RCU free overloads the RCU head over the LRU
		 */
		struct rcu_head *head = (void *)&page->lru;

		call_rcu(head, rcu_free_slab);
	} else
		__free_slab(s, page);
}

I think it is not your patch's fault, but the above code has
already existed.

In your patch, struct rcu_head::debug will share the same memory of
the other field of struct page, (especially share the struct page::flags
which I encountered)

I tested it very long time before, so I can't give you dmesg.

Lai

Mathieu Desnoyers wrote:

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] tree/tiny rcu: Add debug RCU head option (v2), Mathieu Desnoyers, (Thu Mar 18, 6:30 pm)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Paul E. McKenney, (Thu Mar 18, 7:08 pm)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Mathieu Desnoyers, (Thu Mar 18, 7:33 pm)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Lai Jiangshan, (Thu Mar 18, 9:13 pm)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Paul E. McKenney, (Thu Mar 18, 10:05 pm)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Christoph Lameter, (Fri Mar 19, 5:34 am)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Mathieu Desnoyers, (Fri Mar 19, 5:59 am)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Mathieu Desnoyers, (Fri Mar 19, 6:54 am)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Paul E. McKenney, (Fri Mar 19, 7:44 am)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Mathieu Desnoyers, (Fri Mar 19, 9:56 am)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Paul E. McKenney, (Fri Mar 19, 10:11 am)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Christoph Lameter, (Mon Mar 22, 7:37 am)
Re: [PATCH] tree/tiny rcu: Add debug RCU head option (v2), Paul E. McKenney, (Mon Mar 22, 8:56 am)