RCU Archive on lore.kernel.org
 help / color / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: "Zhang, Qiang" <Qiang.Zhang@windriver.com>
Cc: Uladzislau Rezki <urezki@gmail.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 回复: 回复: [PATCH] rcu: Release per-cpu krcp page cache when CPU going offline
Date: Sun, 24 Jan 2021 18:42:48 +0100
Message-ID: <20210124174248.GA1076@pc636> (raw)
In-Reply-To: <BYAPR11MB2632BB67FCC17E3B32CEAEA3FFBE0@BYAPR11MB2632.namprd11.prod.outlook.com>

On Sun, Jan 24, 2021 at 02:21:07AM +0000, Zhang, Qiang wrote:
> 
> 
> ________________________________________
> 发件人: Uladzislau Rezki <urezki@gmail.com>
> 发送时间: 2021年1月22日 22:31
> 收件人: Zhang, Qiang
> 抄送: Uladzislau Rezki; Paul E. McKenney; rcu@vger.kernel.org; linux-kernel@vger.kernel.org
> 主题: Re: 回复: [PATCH] rcu: Release per-cpu krcp page cache when CPU going offline
> 
> On Fri, Jan 22, 2021 at 01:44:36AM +0000, Zhang, Qiang wrote:
> >
> >
> > ________________________________________
> > 发件人: Uladzislau Rezki <urezki@gmail.com>
> > 发送时间: 2021年1月22日 4:26
> > 收件人: Zhang, Qiang
> > 抄送: Paul E. McKenney; rcu@vger.kernel.org; linux-kernel@vger.kernel.org; urezki@gmail.com
> > 主题: Re: [PATCH] rcu: Release per-cpu krcp page cache when CPU going offline
> > >Hello, Qiang,
> >
> > > On Thu, Jan 21, 2021 at 02:49:49PM +0800, qiang.zhang@windriver.com wrote:
> > > > From: Zqiang <qiang.zhang@windriver.com>
> > > >
> > > > If CPUs go offline, the corresponding krcp's page cache can
> > > > not be use util the CPU come back online, or maybe the CPU
> > > > will never go online again, this commit therefore free krcp's
> > > > page cache when CPUs go offline.
> > > >
> > > > Signed-off-by: Zqiang <qiang.zhang@windriver.com>
> > >
> > >Do you consider it as an issue? We have 5 pages per CPU, that is 20480 bytes.
> > >
> >
> > Hello Rezki
> >
> > In a multi CPUs system, more than one CPUs may be offline, there are more than 5 pages,  and these offline CPUs may never go online again  or  in the process of CPUs online, there are errors, which lead to the failure of online, these scenarios will lead to the per-cpu krc page cache will never be released.
> >
> >Thanks for your answer. I was thinking more about if you knew some >platforms
> >which suffer from such extra page usage when CPU goes offline. Any >issues
> >your platforms or devices run into because of that.
> >
> >So i understand that if CPU goes offline the 5 pages associated with it >are
> >unused until it goes online back.
> 
>  I agree with you, But I still want to talk about what I think
> 
>  My understanding is that when the CPU is offline,  the pages is not 
>  accessible,  beacuse we don't know when this CPU will 
>  go online again, so we best to return these page to the buddy system,
>  when the CPU goes online again, we can allocate page from the buddy 
>  system to fill krcp's page cache.  maybe you may think that this memory 
>  is small and don't need to. 
>  
Exactly. I think that 5 pages are not that important(small amount of memory),
so it is not worth to build the logic around it in order to return them back
to the page allocator when CPU goes offline, even forever. This is how i see it.

If you are aware about some specific systems where it is critical, please
let's as know.

--
Vlad Rezki

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  6:49 qiang.zhang
2021-01-21 18:56 ` Paul E. McKenney
2021-01-21 20:26   ` Uladzislau Rezki
2021-01-22  1:44     ` 回复: " Zhang, Qiang
2021-01-22 14:31       ` Uladzislau Rezki
2021-01-24  2:21         ` 回复: " Zhang, Qiang
2021-01-24 17:42           ` Uladzislau Rezki [this message]
2021-01-26 14:07           ` Uladzislau Rezki
2021-01-27  9:00             ` 回复: " Zhang, Qiang
2021-01-27 12:47               ` Uladzislau Rezki

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=20210124174248.GA1076@pc636 \
    --to=urezki@gmail.com \
    --cc=Qiang.Zhang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@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

RCU Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/rcu/0 rcu/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 rcu rcu/ https://lore.kernel.org/rcu \
		rcu@vger.kernel.org
	public-inbox-index rcu

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.rcu


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git