Re: [Lse-tech] Re: [Patch 2/7] Add sysctl for schedstats

Balbir Singh
2006-02-27T10:46:38Z

<snip>
> why not just introduce a schedstats_lock mutex, and acquire it for both
> the 'if (schedstats_sysctl)' line and the schedstats_set() line. That
> will make the locking meaningful: two parallel sysctl ops will be atomic
> to each other. [right now they wont be and they can clear schedstat data
> in parallel -> not a big problem but it makes schedstats_lock rather
> meaningless]
>

Ingo,

Can sysctl's run in parallel? sys_sysctl() is protects the call
to do_sysctl() with BKL (lock_kernel/unlock_kernel).

Am I missing something?

Balbir