From: Carsten Emde <C.Emde@osadl.org>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH v2 1/1] Taskset: check first whether affinity is settable
Date: Tue, 9 Aug 2022 23:54:28 +0200 [thread overview]
Message-ID: <25130ef1-6328-8a4f-3af3-a25d28f9a839@osadl.org> (raw)
In-Reply-To: <20220808133526.k4i5elxhqe66sghm@ws.net.home>
Hi Karel,
On 8/8/22 3:35 PM, Karel Zak wrote:
> On Sun, Aug 07, 2022 at 12:49:16AM +0200, Carsten Emde wrote:
>> If the PF_NO_SETAFFINITY process flag is set, the user may not
>> know why the affinity is not settable. Write a respective message
>> and do not attempt to set the affinity of this process.
>
> I'm unsure if constantly checking for the flag rather than calling
> sched_setaffinity() is the right way. It seems pretty expensive.
>
> I don't like when userspace tries to predict any kernel policy or
> behavior. It seems better to call the syscall and, if necessary,
> compose a better (detailed) error message.
Good point.
> What about the patch below? (I have moved /proc/#/stat parsing to
> lib/procfs.c to keep tastset.c more readable.)
Indeed, that is much better, thanks a lot!
Applied your patch and tested it successfully, you may add my
Tested-by: Carsten Emde <C.Emde@osadl.org>
if you wish.
Thanks again!
Carsten
prev parent reply other threads:[~2022-08-09 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-06 22:49 [PATCH v2 0/1] Taskset: check first whether affinity is settable Carsten Emde
2022-08-06 22:49 ` [PATCH v2 1/1] " Carsten Emde
2022-08-08 13:35 ` Karel Zak
2022-08-09 21:54 ` Carsten Emde [this message]
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=25130ef1-6328-8a4f-3af3-a25d28f9a839@osadl.org \
--to=c.emde@osadl.org \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).