From: Dave Hansen <haveblue@us.ibm.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: How to notify app of changed cpu/mem/io node configuration?
Date: Wed, 30 Jun 2004 01:38:51 +0000 [thread overview]
Message-ID: <1088559531.28410.20.camel@nighthawk> (raw)
In-Reply-To: <20040628173808.04718b83.pj@sgi.com>
On Tue, 2004-06-29 at 18:22, Paul Jackson wrote:
> Dave wrote:
> > (in response to my query of whether you meant "sync" or "async"):
> > Some kind of notification that the kernel sends where it can be sure
> > that the app received it.
>
> Huh - I'm confused as to what you think is essential here. I have this
> sense that you are saying we need reliably acknowledged notification.
> But this seems impossible to me - one cannot have the kernel depending
> on some random bit of user code sending a timely acknowledgement, much
> less on such code doing something competent with the notice.
I was thinking we could just make sure that it handled the signal. But,
that doesn't seem horribly feasible at this point.,
> > Rudely being migrated to CPU 0 would break the app,
> > and could (in theory) cause data corruption.
>
> Then I am surpised that you accept the following bit of code, now
> in Linus' 2.6.7:
>
> kernel/sched.c:migrate_all_tasks()
>
> if (dest_cpu = NR_CPUS) {
> cpus_setall(tsk->cpus_allowed);
> dest_cpu = any_online_cpu(tsk->cpus_allowed);
I don't accept a lot of the cpu hotplug code as it is :).
But, it at least avoids having to really worry about processes handling
the notification, and won't kill them. I guess slow is better than
dead.
> The usual affect of this is to force cpus_allowed to all possible CPUs,
> and to set "dest_cpu = 0". It happens in the case of a migration, when
> none of the remaining CPUs allowed to a task are online.
>
> Hmmm ... thinking out loud ... why not set cpus_allowed to the single
> cpu which is the lowest numbered online cpu, rather than all cpus?
> I see no need to give orphans the run of the entire city!
The only problem that might cause would be scheduler imbalances. It
would sure beat the living daylights out of CPU0 if a lot of tasks were
sent over there. This way, the scheduler at least has a fighting chance
to balance them out.
> > > ... before it told the kernel "all clear - remove old Node from service"
> >
> > I just worry about the complexity of feeding all of this information
> > back to the kernel.
>
> Huh - what's to tell the kernel at this step? "Remove CPU or Memory
> node X from service, with ruthless abandon to any residual user tasks or
> memory left there" -- that's all I see.
I was thinking about how to have a userspace /sbin/hotplug handler tell
the kernel which tasks had been migrated or handled correctly. But,
that doesn't make _any_ sense as I think back. I think I was in a
meeting when I sent that and my brain was turned off.
-- Dave
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2004-06-30 1:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-29 0:38 How to notify app of changed cpu/mem/io node configuration? Paul Jackson
2004-06-29 6:24 ` Greg KH
2004-06-29 8:37 ` Paul Jackson
2004-06-29 22:41 ` Dave Hansen
2004-06-29 23:15 ` Paul Jackson
2004-06-29 23:39 ` Dave Hansen
2004-06-29 23:53 ` Rusty Russell
2004-06-30 1:22 ` Paul Jackson
2004-06-30 1:38 ` Dave Hansen [this message]
2004-06-30 1:40 ` Paul Jackson
2004-06-30 2:16 ` Paul Jackson
2004-06-30 11:57 ` jlm_devel
2004-06-30 12:26 ` Paul Jackson
2004-06-30 13:08 ` Paul Jackson
2004-06-30 17:37 ` jlm_devel
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=1088559531.28410.20.camel@nighthawk \
--to=haveblue@us.ibm.com \
--cc=linux-hotplug@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).