public inbox for [email protected]
 help / color / mirror / Atom feed
From: Hao Xu <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected], Pavel Begunkov <[email protected]>,
	Joseph Qi <[email protected]>
Subject: Re: [PATCH] io_uring: consider cgroup setting when binding sqpoll cpu
Date: Tue, 17 Aug 2021 20:08:33 +0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

在 2021/8/17 上午12:58, Jens Axboe 写道:
> On 8/16/21 12:04 AM, Hao Xu wrote:
>> 在 2021/8/15 下午11:19, Jens Axboe 写道:
>>> On 8/15/21 9:10 AM, Hao Xu wrote:
>>>> Since sqthread is userspace like thread now, it should respect cgroup
>>>> setting, thus we should consider current allowed cpuset when doing
>>>> cpu binding for sqthread.
>>>
>>> This seems a bit convoluted for what it needs to do. Surely we can just
>>> test sqd->sq_cpu directly in the task_cs()?
>> I didn't know task_cs() before, it seems to be a static function, which
>> is called by cpuset_cpus_allowed(), and this one is exposed.
> 
> But it'd be a much saner to add a helper for this rather than add all
> of that boiler plate code to io_uring just to check for whether or not
> a CPU is set in a mask.
I looked into cpuset_cpus_allowed(), it seems the code logic
guarantee_online_cpus() is neccessary? It guarantees the cpumask
returned are all online cpus.


> 


  reply	other threads:[~2021-08-17 12:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15 15:10 [PATCH] io_uring: consider cgroup setting when binding sqpoll cpu Hao Xu
2021-08-15 15:19 ` Jens Axboe
2021-08-16  6:04   ` Hao Xu
2021-08-16 16:58     ` Jens Axboe
2021-08-17 12:08       ` Hao Xu [this message]
2021-08-15 15:22 ` Hao Xu

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=2d7ac2b1-0f64-93ff-fbb1-e5db9b92fd2d@linux.alibaba.com \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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