Re: [rfc] [patch] mm: Slab - Eliminate lock_cpu_hotplug from slab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 27 Oct 2006 18:19:19 -0700
Ravikiran G Thirumalai <[email protected]> wrote:

> Another note.  Looks like a cpu hotplug event can send  CPU_UP_CANCELED to
> a registered subsystem even if the subsystem did not receive CPU_UP_PREPARE.
> This could be due to a subsystem registered for notification earlier than
> the current subsystem crapping out with NOTIFY_BAD. Badness can occur with
> in the CPU_UP_CANCELED code path at slab if this happens (The same would
> apply for workqueue.c as well).

yup, cancellation doesn't work at present.

>  To overcome this, we might have to use either
> a) a per subsystem flag and avoid handling of CPU_UP_CANCELED, or
> b) Use a special notifier events like LOCK_ACQUIRE/RELEASE as Gautham was
>    using in his experiments, or
> c) Do not send CPU_UP_CANCELED to a subsystem which did not receive
>    CPU_UP_PREPARE.
> 
> I would prefer c).

c) would work.  I guess we could do that by simply counting the number of
called handlers rather than having to record state within each one.

It would require changes to the notifier_chain API, but I think the changes
are needed - the problem is general.  Something like:


int __raw_notifier_call_chain(struct raw_notifier_head *nh,
		unsigned long val, void *v, unsigned nr_to_call, int *nr_called);

int raw_notifier_call_chain(struct raw_notifier_head *nh,
		unsigned long val, void *v)
{
	return __raw_notifier_call_chain(nh, val, v, -1, NULL);
}


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux