cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: GNU C Library <libc-alpha@sourceware.org>
Cc: cgroups@vger.kernel.org, kosaki.motohiro@gmail.com,
	Linux API <linux-api@vger.kernel.org>,
	Li Zefan <lizefan@huawei.com>
Subject: Re: [PATCH] glibc: Remove CPU set size checking from affinity functions [BZ #19143]
Date: Sat, 17 Oct 2015 07:48:06 +0200	[thread overview]
Message-ID: <87io66kpux.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20151017031003.GE28215@vapier.lan> (Mike Frysinger's message of "Fri, 16 Oct 2015 23:10:03 -0400")

* Mike Frysinger:

> On 16 Oct 2015 17:06, Florian Weimer wrote:
>> The current situation, briefly stated, is this: glibc tries to guess the
>> kernel CPU set size and rejects attempts to specify an affinity mask
>> which is larger than that, but it does not work, and glibc and the
>> kernel still silently accept CPU affinity masks with invalid bits,
>> without returning an error.  The glibc check does not provide any value
>> to applications, it just adds pointless complexity to the library.
>> Therefore, I want to remove it from glibc.
>
> checking the validty of the cpuset mask at the time of setting attributes
> seems fundamentally wrong to me.  can't the cpuset change too between the
> check and the actual use ?

Yes, unfortunately, that could happen.  There are algorithms that
would benefit if the affinity mask could not be changed from outside
the process.

> patch makes sense to me
>
>> +	  abort ();
>
> why does the test call abort instead of exit ?

It would have to be _exit, because otherwise, the remaining running
threads would block exiting.

> abort writes to stderr.

I don't think so, “Aborted” is printed by the shell.

  reply	other threads:[~2015-10-17  5:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 15:06 [PATCH] glibc: Remove CPU set size checking from affinity functions [BZ #19143] Florian Weimer
2015-10-17  3:10 ` Mike Frysinger
2015-10-17  5:48   ` Florian Weimer [this message]
2015-10-17 15:38     ` Mike Frysinger
     [not found] ` <5621126E.5080801-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-19 17:23   ` Carlos O'Donell
     [not found]     ` <56252723.6010407-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-23 14:00       ` 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=87io66kpux.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=cgroups@vger.kernel.org \
    --cc=kosaki.motohiro@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=lizefan@huawei.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).