public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Waiman Long <longman@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org, Phil Auld <pauld@redhat.com>,
	Brent Rowsell <browsell@redhat.com>,
	Peter Hunt <pehunt@redhat.com>
Subject: Re: [PATCH v4] sched/core: Use zero length to reset cpumasks in sched_setaffinity()
Date: Wed, 04 Oct 2023 14:55:10 +0200	[thread overview]
Message-ID: <87mswycztd.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <4a4076c4-c6ad-063d-a2e1-3048cf71f723@redhat.com> (Waiman Long's message of "Wed, 4 Oct 2023 08:41:21 -0400")

* Waiman Long:

> On 10/4/23 08:34, Florian Weimer wrote:
>> * Peter Zijlstra:
>>
>>> Subject: sched: Add CPU_FILL()
>>>
>>> Add the CPU_FILL() macros to easily create an all-set cpumask.
>>>
>>> FreeBSD also provides this macro with this semantic.
>>>
>>> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>> My main concer is that obtaining the size of the mask, or at least an
>> approximiation is not exactly easy.  If there's an expectation that
>> applications reset the mask more often than they do today (I don't have
>> the full context here), then we'd some decent interface to get the
>> approriate size.
>
> I believe the macro just use sizeof(cpu_set_t) as the size of the
> bitmask. It is the same case as in CPU_ZERO().

I mean the CPU_FILL_S macro also defined in the patch.  Correctly
written applications should not use CPU_FILL and statically sized CPU
sets.

Thanks,
Florian


  reply	other threads:[~2023-10-04 12:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 20:57 [PATCH v4] sched/core: Use zero length to reset cpumasks in sched_setaffinity() Waiman Long
2023-10-04  8:36 ` Peter Zijlstra
2023-10-04  9:23   ` Ingo Molnar
2023-10-04  9:43     ` Peter Zijlstra
2023-10-04 10:06       ` Ingo Molnar
2023-10-04 12:19         ` Waiman Long
2023-10-04 12:34   ` Florian Weimer
2023-10-04 12:41     ` Waiman Long
2023-10-04 12:55       ` Florian Weimer [this message]
2023-10-04 16:23         ` Waiman Long
2023-10-04 13:52     ` Peter Zijlstra
2023-10-04 13:54       ` Peter Zijlstra

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=87mswycztd.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=bristot@redhat.com \
    --cc=browsell@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=pauld@redhat.com \
    --cc=pehunt@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@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