[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B958ABC.3010401@kernel.org>
Date: Tue, 09 Mar 2010 08:39:40 +0900
From: Tejun Heo <tj@...nel.org>
To: Heiko Carstens <heiko.carstens@...ibm.com>
CC: Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
rusty@...tcorp.com.au, sivanich@....com,
torvalds@...ux-foundation.org, mingo@...e.hu, peterz@...radead.org,
dipankar@...ibm.com, josh@...edesktop.org,
paulmck@...ux.vnet.ibm.com, akpm@...ux-foundation.org,
Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [PATCH 2/4] stop_machine: reimplement using cpuhog
Hello,
On 03/09/2010 04:37 AM, Heiko Carstens wrote:
>> How cpuhog can make a difference? Afaics, we shouldn't pass a
>> blocking callback to hog_cpus/hog_one_cpu.
>
> Well, it might me true that this shouldn't be done. But I don't see
> a reason why in general it wouldn't work to pass a function that
> would block. So it's just a matter of time until somebody uses it
> for such a purpose. For the current stop_machine implementation it
> would be broken to pass a blocking function (preemption disabled,
> interrupts disabled).
Well, all current users don't block and it definitely can be enforced
by turning off preemption around the callback. stop_machine() uses
busy waiting for every state transition so something else blocking on
a cpu could waste a lot of cpu cycles on other cpus even if the wait
is guaranteed to be finite. Would that sooth your concern?
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists