From: Ashok Raj <ashok.raj@intel.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, pavel@suse.cz,
Jeremy Fitzhardinge <jeremy@goop.org>,
"Randy.Dunlap" <rdunlap@xenotime.net>,
clameter@sgi.com, ntl@pobox.com, akpm@osdl.org,
ashok.raj@intel.com, ak@suse.de, nickpiggin@yahoo.com.au,
mingo@elte.hu
Subject: Re: [RFC][PATCH] avoid cpu hot removal if busy take3
Date: Fri, 23 Jun 2006 12:09:50 -0700 [thread overview]
Message-ID: <20060623120950.A31038@unix-os.sc.intel.com> (raw)
In-Reply-To: <20060623164042.3a828e8e.kamezawa.hiroyu@jp.fujitsu.com>; from kamezawa.hiroyu@jp.fujitsu.com on Fri, Jun 23, 2006 at 04:40:42PM +0900
On Fri, Jun 23, 2006 at 04:40:42PM +0900, KAMEZAWA Hiroyuki wrote:
>
> In this case,
> 1. ignore bad configuration in user-land just do warnings.
> 2. cancel cpu hot removal and warn users to fix the problem and retry.
> seems to be a realisitc workaround. Killing the problematic process may
> cause some trouble in user-land (dead-lock etc..)
>
> This patch adds sysctl cpu_removal_migration.
> If cpu_removal_migration == 1, all tasks are migrated by force.
> If cpu_removal_migration == 0, cpu_hotremoval can fail because of not-migratable
> tasks.
Having this dual behaviour is a concern. Probably we should have the tasks
decide if they want to terminate themselves if its not *OK* to run on a
different CPU, and not have a policy in kernel decide which way the
behaviour should be. The kernel policy should be to always force
the cpu removal to happen. Admin should decide what processes should terminate
ahead of time before the removal force migrates them.
Once the kernel/admin chooses to perform cpu offline, it should not be possible
for some process to veto the removal and fail the removal. Removal was probably
choosen since we would like to offline a failing cpu, and dont want some
thing in the way to make that happen.
> + */
> +static int test_cpu_busy(int cpu)
> +{
> + cpumask_t mask;
> + int ret = 0;
Deleted....
> +
> + read_lock(&tasklist_lock);
> + for_each_process(p) {
> + if (p == current)
> + continue;
> + if (p->mm && cpus_equal(mask, p->cpus_allowed)) {
> + ret = 1;
> + pid = p->pid;
> + break;
> + }
Do you want to scan and print all possible id's? otherwise printk will
have just 1, and next attempt will show another pid now... in case the
admin wants to do something useful with this list, probably better to
give it all out?
--
Cheers,
Ashok Raj
- Open Source Technology Center
next prev parent reply other threads:[~2006-06-23 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 7:40 KAMEZAWA Hiroyuki
2006-06-23 14:27 ` Nathan Lynch
2006-06-23 14:35 ` KAMEZAWA Hiroyuki
2006-06-23 15:10 ` Pavel Machek
2006-06-23 15:34 ` KAMEZAWA Hiroyuki
2006-06-23 19:09 ` Ashok Raj [this message]
2006-06-23 23:27 ` KAMEZAWA Hiroyuki
2006-06-24 22:21 ` Randy.Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060623120950.A31038@unix-os.sc.intel.com \
--to=ashok.raj@intel.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=jeremy@goop.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=ntl@pobox.com \
--cc=pavel@suse.cz \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®