From: Matthew Dobson <colpatch@us.ibm.com>
To: Robert Love <rml@tech9.net>
Cc: Davide Libenzi <davidel@xmailserver.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] cpus_allowed/launch_policy patch, 2.4.16
Date: Thu, 06 Dec 2001 14:21:40 -0800 [thread overview]
Message-ID: <3C0FEF74.D2C726E8@us.ibm.com> (raw)
In-Reply-To: <3C0ECBE0.F21464FA@us.ibm.com> <Pine.LNX.4.40.0112051800400.1644-100000@blue1.dev.mcafeelabs.com> <3C0ED52E.B15F0ED7@us.ibm.com> <1007606568.814.15.camel@phantasy>
Robert Love wrote:
>
> On Wed, 2001-12-05 at 21:17, Matthew Dobson wrote:
>
> > but, as soon as one of them exec()'s their no longer going to be using your
> > functions.
>
> But cpus_allowed is inherited, so why does it matter?
You're right, cpus_allowed would inherit just fine on its own, but...
>
> The only benefit I see to having it part of the fork operation as
> opposed to Ingo's or my own patch, is that the parent need not be given
> the same affinity.
...this is the important part. As soon as you start a process executing
on a particular CPU/Node (more important on a NUMA box) it begins to develop
a memory footprint. Things start getting allocated to that CPU's or Node's
memory. When you push the process to a different node for no good reason
(just to fork() and then come back to the original node) it is inefficient.
You are going to be causing all kinds of remote memory accesses that don't need
to happen. As the kernel gets more NUMA-aware, this will be even more of a
discrepancy between the two methods.
>
> And honestly I don't see that as a need. You could always change it
> back after the exec. If that is unacceptable (you point out the cost of
> forcing a task on and off a certain CPU), you could just have a wrapper
> you exec that changes its affinity and then it execs the children.
This seems to me to be a bit of a kludgy (although perfectly valid) way of
doing something that could be done much more elegantly and efficiently with
a launch_policy. If you use the wrapper method, the task structure and
various other internal kernel data structures could be allocated on the
incorrect node. This data will eventually migrate to the correct place,
but why start the process out on the wrong foot, when the cost of doing
the correct allocation is so small (or nonexistent)?
Cheers!
-matt
next prev parent reply other threads:[~2001-12-06 22:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-22 8:59 [patch] sched_[set|get]_affinity() syscall, 2.4.15-pre9 Ingo Molnar
2001-11-22 20:22 ` Davide Libenzi
2001-11-22 23:45 ` Robert Love
2001-11-23 0:20 ` Ryan Cumming
2001-11-23 0:36 ` Mark Hahn
2001-11-23 11:46 ` Ingo Molnar
2001-11-24 22:44 ` Davide Libenzi
2001-11-23 0:51 ` Robert Love
2001-11-23 1:11 ` Andreas Dilger
2001-11-23 1:16 ` Robert Love
2001-11-23 11:36 ` Ingo Molnar
2001-11-24 2:01 ` Davide Libenzi
2001-11-27 3:39 ` Robert Love
2001-11-27 7:13 ` Joe Korty
2001-11-27 20:53 ` Robert Love
2001-11-27 21:31 ` Nathan Dabney
2001-11-27 8:04 ` procfs bloat, syscall bloat [in reference to cpu affinity] Joe Korty
2001-11-27 11:32 ` Ingo Molnar
2001-11-27 20:56 ` Robert Love
2001-11-27 14:04 ` Phil Howard
2001-11-27 18:05 ` Tim Hockin
2001-11-27 8:40 ` [patch] sched_[set|get]_affinity() syscall, 2.4.15-pre9 Ingo Molnar
2001-11-27 4:41 ` a nohup-like interface to cpu affinity Linux maillist account
2001-11-27 4:49 ` Robert Love
2001-11-27 6:32 ` Linux maillist account
2001-11-27 6:39 ` Robert Love
2001-11-27 8:42 ` Sean Hunter
2001-12-06 1:35 ` Matthew Dobson
2001-12-06 1:37 ` [RFC][PATCH] cpus_allowed/launch_policy patch, 2.4.16 Matthew Dobson
2001-12-06 2:08 ` Davide Libenzi
2001-12-06 2:17 ` Matthew Dobson
2001-12-06 2:39 ` Davide Libenzi
2001-12-06 2:42 ` Robert Love
2001-12-06 22:21 ` Matthew Dobson [this message]
2001-11-27 6:50 ` a nohup-like interface to cpu affinity Linux maillist account
2001-11-27 8:26 ` Ingo Molnar
2001-11-23 11:02 ` [patch] sched_[set|get]_affinity() syscall, 2.4.15-pre9 Ingo Molnar
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=3C0FEF74.D2C726E8@us.ibm.com \
--to=colpatch@us.ibm.com \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.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