From: chrubis@suse.cz
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] tst_ncpus_max: use kernel_max if available
Date: Tue, 26 Aug 2014 12:06:42 +0200 [thread overview]
Message-ID: <20140826100642.GA27928@rei> (raw)
In-Reply-To: <0be2f82a131d32b119748e91a840cb038bf82960.1409046964.git.jstancek@redhat.com>
Hi!
> sched_getaffinity() and sched_setaffinity() cares about number of possible
> CPUs the OS or hardware can support, which can be larger than what
> sysconf(_SC_NPROCESSORS_CONF) currently provides (by enumarating
> /sys/devices/system/cpu/cpu* entries).
>
> Use /sys/devices/system/cpu/kernel_max, if available. This represents
> NR_CPUS-1, a compile time option which specifies "maximum number of CPUs
> which this kernel will support". This should give us cpu mask size
> large enough for any purposes.
>
> If the kernel_max sysfs file is not available, fall back to
> _SC_NPROCESSORS_CONF.
Looks good to me, acked.
Is this last failure that needed to be fixed before the release or are
there any more?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-08-26 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 10:01 [LTP] [PATCH] tst_ncpus_max: use kernel_max if available Jan Stancek
2014-08-26 10:06 ` chrubis [this message]
[not found] ` <1144259951.13045166.1409048187591.JavaMail.zimbra@redhat.com>
2014-08-26 10:55 ` chrubis
[not found] ` <1485901937.13089374.1409051869026.JavaMail.zimbra@redhat.com>
2014-08-26 11:24 ` chrubis
[not found] ` <555448176.13093369.1409052507826.JavaMail.zimbra@redhat.com>
2014-08-26 13:51 ` chrubis
2014-08-26 15:42 ` chrubis
2014-08-27 7:41 ` chrubis
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=20140826100642.GA27928@rei \
--to=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.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