public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Hao Lee <haolee.swjtu@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Linux MM <linux-mm@kvack.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	vdavydov.dev@gmail.com, Shakeel Butt <shakeelb@google.com>,
	cgroups@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: reduce spinlock contention in release_pages()
Date: Mon, 29 Nov 2021 09:39:16 +0100	[thread overview]
Message-ID: <YaSRtKwTCOj7JnR6@dhcp22.suse.cz> (raw)
In-Reply-To: <20211126162623.GA10277@haolee.io>

On Fri 26-11-21 16:26:23, Hao Lee wrote:
[...]
> I will try Matthew's idea to use semaphore or mutex to limit the number of BE
> jobs that are in the exiting path. This sounds like a feasible approach for
> our scenario...

I am not really sure this is something that would be acceptable. Your
problem is resource partitioning. Papering that over by a lock is not
the right way to go. Besides that you will likely hit a hard question on
how many tasks to allow to run concurrently. Whatever the value some
workload will very likely going to suffer. We cannot assume admin to
chose the right value because there is no clear answer for that. Not to
mention other potential problems - e.g. even more priority inversions
etc.
-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2021-11-29  8:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 15:19 [PATCH] mm: reduce spinlock contention in release_pages() Hao Lee
2021-11-24 15:57 ` Matthew Wilcox
2021-11-25  3:13   ` Hao Lee
2021-11-24 16:31 ` Michal Hocko
2021-11-25  3:24   ` Hao Lee
2021-11-25  3:30     ` Matthew Wilcox
2021-11-25  8:02       ` Hao Lee
2021-11-25 10:01         ` Michal Hocko
2021-11-25 12:31           ` Hao Lee
2021-11-25 14:18             ` Michal Hocko
2021-11-26  6:50               ` Hao Lee
2021-11-26 10:46                 ` Michal Hocko
2021-11-26 16:26                   ` Hao Lee
2021-11-29  8:39                     ` Michal Hocko [this message]
2021-11-29 13:23                       ` Matthew Wilcox
2021-11-29 13:39                         ` Michal Hocko
2021-11-25 18:04         ` Matthew Wilcox
2021-11-26  6:54           ` Hao Lee

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=YaSRtKwTCOj7JnR6@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=haolee.swjtu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shakeelb@google.com \
    --cc=vdavydov.dev@gmail.com \
    --cc=willy@infradead.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