public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	mingo@redhat.com, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org
Subject: Re: [PATCH] sched/core: expand sched_getaffinity(2) to return number of CPUs
Date: Fri, 05 Apr 2019 13:08:58 +0200	[thread overview]
Message-ID: <87ftqw3e0l.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <20190405110415.GP12232@hirez.programming.kicks-ass.net> (Peter Zijlstra's message of "Fri, 5 Apr 2019 13:04:15 +0200")

* Peter Zijlstra:

> On Fri, Apr 05, 2019 at 12:16:39PM +0200, Florian Weimer wrote:
>
>> > True; but I suppose glibc already does lots of that anyway, right? It
>> > does contain the right information.
>> 
>> If I recall correctly my last investigation,
>> /sys/devices/system/cpu/possible does not reflect the size of the
>> affinity mask, either.
>
> Strictly speaking correct; the bitmap can be longer than the highest
> possible cpu number, however the remainder would be 0-padding and could
> thus be stripped without issue.

Doesn't the kernel still enforce the larget bitmap in sched_getaffinity,
even if the bits are always zero?

Thanks,
Florian

  reply	other threads:[~2019-04-05 11:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 20:08 [PATCH] sched/core: expand sched_getaffinity(2) to return number of CPUs Alexey Dobriyan
2019-04-04  8:42 ` Peter Zijlstra
2019-04-04 18:02   ` Alexey Dobriyan
2019-04-05  9:26     ` Peter Zijlstra
2019-04-05 10:16   ` Florian Weimer
2019-04-05 11:04     ` Peter Zijlstra
2019-04-05 11:08       ` Florian Weimer [this message]
2019-04-05 11:49         ` Peter Zijlstra
2019-04-06 19:48     ` Alexey Dobriyan
2019-04-08  7:49       ` Florian Weimer

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=87ftqw3e0l.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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