All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Qiang" <Qiang.Zhang@windriver.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	"pmladek@suse.com" <pmladek@suse.com>,
	"tj@kernel.org" <tj@kernel.org>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 回复: 回复: [PATCH v2] kthread_worker: re-set CPU affinities if CPU come online
Date: Thu, 29 Oct 2020 03:14:48 +0000	[thread overview]
Message-ID: <BYAPR11MB2632B18DF7C02B68E758932BFF140@BYAPR11MB2632.namprd11.prod.outlook.com> (raw)
In-Reply-To: <871rhi1z7j.fsf@nanos.tec.linutronix.de>



________________________________________
发件人: Thomas Gleixner <tglx@linutronix.de>
发送时间: 2020年10月28日 17:23
收件人: Zhang, Qiang; pmladek@suse.com; tj@kernel.org
抄送: akpm@linux-foundation.org; linux-mm@kvack.org; linux-kernel@vger.kernel.org
主题: Re: 回复: [PATCH v2] kthread_worker: re-set CPU affinities if CPU come online

> [Please note this e-mail is from an EXTERNAL e-mail address]
>
> On Wed, Oct 28 2020 at 15:30, qiang zhang wrote:
>
>>How is that addressing any of the comments I made on V1 of this?
>
> Do you mean the following problem:
>
> "The dynamic hotplug states run late. What's preventing work to be queued
> on such a worker before it is bound to the CPU again?"
>
>This is one problem, but there are more and I explained them in great
>length. If there is anything unclear, then please ask.

Really, this patch is not considered that work may be put into the queue after the bound CPU is offline.   in addition, when the bound CPU goes online again, before restoring the worker's CPU affinity, work may be put into the queue.

Although  int this (powerclamp) way,that's not a problem, that it is solved by destroying and creating  tasks when the CPU hotplug,  in addition,  when CPU going down , this need call 'cancel_work_sync' func in offline callback,  this may be blocked long time. these operation is expensive.

this patch only just to recover  the worker task's affinity when CPU go to online again that create by "kthread_create_worker_on_cpu" func ,  likely per-CPU worker method when CPU hotplug in "workqueue" and "io-wq".

Thanks

Qiang

>
>Thanks,
>
>        tglx

  reply	other threads:[~2020-10-29  7:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  7:30 [PATCH v2] kthread_worker: re-set CPU affinities if CPU come online qiang.zhang
2020-10-28  8:30 ` Thomas Gleixner
2020-10-28  8:45   ` 回复: " Zhang, Qiang
2020-10-28  9:23     ` Thomas Gleixner
2020-10-29  3:14       ` Zhang, Qiang [this message]
2020-10-29  8:27         ` 回复: " Thomas Gleixner
2020-10-29 13:08           ` Petr Mladek
2020-10-29 15:01             ` Thomas Gleixner

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=BYAPR11MB2632B18DF7C02B68E758932BFF140@BYAPR11MB2632.namprd11.prod.outlook.com \
    --to=qiang.zhang@windriver.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pmladek@suse.com \
    --cc=tglx@linutronix.de \
    --cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.