mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: brookxu <brookxu.cn@gmail.com>
Cc: hannes@cmpxchg.org, vdavydov.dev@gmail.com,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	cgroups@vger.kernel.org
Subject: Re: [PATCH 1/2] mem_cgroup: optimize the atomic count of wb_completion
Date: Fri, 24 Sep 2021 11:34:25 +0200	[thread overview]
Message-ID: <YU2boTZhfbo0h/Xi@dhcp22.suse.cz> (raw)
In-Reply-To: <1632465983-30525-1-git-send-email-brookxu.cn@gmail.com>

On Fri 24-09-21 14:46:22, brookxu wrote:
> From: Chunguang Xu <brookxu@tencent.com>
> 
> In order to track inflight foreign writeback, we init
> wb_completion.cnt to 1. For normal writeback, this cause
> wb_wait_for_completion() to perform meaningless atomic
> operations. Since foreign writebacks rarely occur in most
> scenarios, we can init wb_completion.cnt to 0 and set
> frn.done.cnt to 1. In this way we can avoid unnecessary
> atomic operations.

Does this lead to any measurable differences?
-- 
Michal Hocko
SUSE Labs

  parent reply	other threads:[~2021-09-24  9:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  6:46 brookxu
2021-09-24  6:46 ` [PATCH 2/2] mem_cgroup: introduce foreign_writeback_in_process() function brookxu
2021-09-24  9:34 ` Michal Hocko [this message]
2021-09-24 13:02   ` [PATCH 1/2] mem_cgroup: optimize the atomic count of wb_completion brookxu
2021-09-24 14:01     ` Michal Hocko
2021-09-24 15:21       ` brookxu.cn

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=YU2boTZhfbo0h/Xi@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=brookxu.cn@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vdavydov.dev@gmail.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

all inboxes | Powered by JetHome®