From: Michal Hocko Subject: Re: [PATCH] mm: reduce spinlock contention in release_pages() Date: Mon, 29 Nov 2021 09:39:16 +0100 Message-ID: References: <20211125080238.GA7356@haolee.io> <20211125123133.GA7758@haolee.io> <20211126162623.GA10277@haolee.io> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1638175157; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y1/HRvQWe5bupilVHXWVZDusBm8nr9LZt0uqBedKdKA=; b=J4qijL9j7NKJC0s4vnqOlrDs2BSFPsMfOKHgq75fzXUbUMmG6kDFsHC446/t8l9HnhxQGi 1X48f8fJWJ9sQfbIUtxwtWBvay0Vz0aMdUE83pfyyc4cYhcZsz7fW82PhBT10czrrivQxi qE3pMx7MyDOyufnfhAhM+rP1LoUdXcM= Content-Disposition: inline In-Reply-To: <20211126162623.GA10277@haolee.io> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hao Lee Cc: Matthew Wilcox , Linux MM , Johannes Weiner , vdavydov.dev@gmail.com, Shakeel Butt , cgroups@vger.kernel.org, LKML 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