Linux io-uring development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Felix Moessbauer <felix.moessbauer@siemens.com>, asml.silence@gmail.com
Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org,
	cgroups@vger.kernel.org, dqminh@cloudflare.com,
	longman@redhat.com, adriaan.schmidt@siemens.com,
	florian.bezdeka@siemens.com, stable@vger.kernel.org
Subject: Re: [PATCH 1/1] io_uring/sqpoll: inherit cpumask of creating process
Date: Fri, 6 Sep 2024 10:00:46 -0600	[thread overview]
Message-ID: <ed995e2d-23b7-44c5-b064-2927dc20420f@kernel.dk> (raw)
In-Reply-To: <20240906134433.433083-1-felix.moessbauer@siemens.com>

On 9/6/24 7:44 AM, Felix Moessbauer wrote:
> diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
> index 3b50dc9586d1..4681b2c41a96 100644
> --- a/io_uring/sqpoll.c
> +++ b/io_uring/sqpoll.c
> @@ -289,7 +289,7 @@ static int io_sq_thread(void *data)
>  	if (sqd->sq_cpu != -1) {
>  		set_cpus_allowed_ptr(current, cpumask_of(sqd->sq_cpu));
>  	} else {
> -		set_cpus_allowed_ptr(current, cpu_online_mask);
> +		set_cpus_allowed_ptr(current, sqd->thread->cpus_ptr);
>  		sqd->sq_cpu = raw_smp_processor_id();
>  	}

On second thought, why are we even setting this in the first place?
sqd->thread == current here, it should be a no-op to do:

	set_cpus_allowed_ptr(current, current->cpus_ptr);

IOW, the line should just get deleted. Can you send out a v2?

-- 
Jens Axboe


      parent reply	other threads:[~2024-09-06 16:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 13:44 [PATCH 1/1] io_uring/sqpoll: inherit cpumask of creating process Felix Moessbauer
2024-09-06 13:47 ` Jens Axboe
2024-09-06 13:52   ` MOESSBAUER, Felix
2024-09-06 13:55     ` Jens Axboe
2024-09-06 13:54 ` Jens Axboe
2024-09-06 16:00 ` Jens Axboe [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=ed995e2d-23b7-44c5-b064-2927dc20420f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=adriaan.schmidt@siemens.com \
    --cc=asml.silence@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=dqminh@cloudflare.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=stable@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