From: Peter Zijlstra <peterz@infradead.org>
To: Florian Weimer <fweimer@redhat.com>
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, 5 Apr 2019 13:49:41 +0200 [thread overview]
Message-ID: <20190405114941.GR12232@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <87ftqw3e0l.fsf@oldenburg2.str.redhat.com>
On Fri, Apr 05, 2019 at 01:08:58PM +0200, Florian Weimer wrote:
> * 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?
Oh crap, you're right. That's unfortunate I suppose.
next prev parent reply other threads:[~2019-04-05 11:49 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
2019-04-05 11:49 ` Peter Zijlstra [this message]
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=20190405114941.GR12232@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=adobriyan@gmail.com \
--cc=fweimer@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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;
as well as URLs for NNTP newsgroup(s).