From: Arjan van de Ven <arjan@infradead.org>
To: Phy Prabab <phyprabab@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about setting affinity in 2.4
Date: Mon, 19 Feb 2007 14:33:06 +0100 [thread overview]
Message-ID: <1171891986.3531.34.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <2fe399760702181802q39e75b42iea7f80124506f169@mail.gmail.com>
On Sun, 2007-02-18 at 18:02 -0800, Phy Prabab wrote:
> Hello everyone,
>
> I am trying to set affinity on a program to make sure I can get the
> best use of the cache as possible and to eliminate as much noise as
> possible with running my program. I have tried unsuccessfully to set
> affinity using sched_set/getaffinity and the CPU_SET macros. In
> particular, I can not seem to get the process to use affinity I
> specify as in:
>
> int main () {
> cpu_set_t mask;
> cpu_set_t setmask;
> long long x;
> double foo;
> printf("Mask set to %08lx\n", sched_getaffinity(0, &mask));
int sched_setaffinity(pid_t pid, unsigned int cpusetsize,
cpu_set_t *mask);
sched_setaffinity takes 3 not 2 parameters.
next prev parent reply other threads:[~2007-02-19 13:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 2:02 Phy Prabab
2007-02-19 4:39 ` Willy Tarreau
2007-02-19 5:14 ` Phy Prabab
2007-02-19 6:21 ` Willy Tarreau
2007-02-19 13:33 ` Arjan van de Ven [this message]
2007-02-19 13:41 ` Pádraig Brady
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=1171891986.3531.34.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phyprabab@gmail.com \
/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®