mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Josh Hunt <joshhunt00@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Milton Miller <miltonm@bga.com>, Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org, anton@samba.org
Subject: Re: cpumask: fix compat getaffinity
Date: Wed, 15 Dec 2010 15:40:51 +0100	[thread overview]
Message-ID: <201012151540.51975.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTi=ghZn9o_7Dab2GQebZUZBZk+um0vYbZZLC3dMf@mail.gmail.com>

On Tuesday 14 December 2010, Josh Hunt wrote:
> 
> I realize this thread is fairly old, but I have a question about this
> statement in the changelog:
> 
> > On NUMA systems with less than 32 possibly CPUs, the
> > current compat_sys_sched_getaffinity now returns '4'
> > instead of the actual NR_CPUS/8, which makes libnuma
> > bail out when parsing the cpumap.
> 
> This does not seem accurate, at least not on my system with NR_CPUS=32
> and nr_cpu_ids=8. The smallest value retlen will ever be set to is
> sizeof(long) which is 8 on most modern systems. This breaks the
> statement that this function will now return NR_CPUS/8.

Yes, I think the description is a bit misleading there.
The point was that it should return the number that the
sysfs files are based on, instead of the smallest multiple
of sizeof(compat_long) that can hold the installed CPUs.

	Arnd

  reply	other threads:[~2010-12-15 14:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 12:45 Arnd Bergmann
2010-05-08  8:30 ` Rusty Russell
2010-05-08  9:11   ` Arnd Bergmann
2010-05-10 23:43     ` Rusty Russell
2010-05-11  1:47       ` KOSAKI Motohiro
2010-05-11  3:13         ` [stable] " Greg KH
2010-05-11  5:51           ` Rusty Russell
2010-05-11  6:25             ` KOSAKI Motohiro
2010-05-11  6:20           ` KOSAKI Motohiro
2010-05-11 15:20             ` Greg KH
2010-05-11 18:13               ` Arnd Bergmann
2010-05-11 21:36                 ` Greg KH
2010-05-12  8:30           ` Milton Miller
2010-05-14 12:39             ` Rusty Russell
2010-05-17  6:04               ` KOSAKI Motohiro
2010-05-17 18:58                 ` Arnd Bergmann
2010-05-18  0:57                 ` Rusty Russell
2010-12-14 16:59                 ` Josh Hunt
2010-12-15 14:40                   ` Arnd Bergmann [this message]
2010-06-22 23:30             ` Rusty Russell
2010-05-11  9:05       ` Arnd Bergmann
2010-05-12  0:52         ` KOSAKI Motohiro

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=201012151540.51975.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=anton@samba.org \
    --cc=greg@kroah.com \
    --cc=joshhunt00@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=rusty@rustcorp.com.au \
    /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

Powered by JetHome