From: Matthew Wilcox Subject: Re: [PATCH] mm: reduce spinlock contention in release_pages() Date: Thu, 25 Nov 2021 03:30:44 +0000 Message-ID: References: <20211124151915.GA6163@haolee.io> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FJveyksDdIzezjLTh+rtqlw7W3mbjgrzS1zYLwDdyJw=; b=Vj1482sPd6MjdEtA4qCXvJvQgD WL8f/9idar4o0C/fULR3TZDxRtRNJMjmdXZyjO9qAMmUE6otb1jbAdlCat9KaXunIf3DoF/4SaiZo d70wYXABjupPPwTtTdu75c8n0aotcx9CFFrEmcXXFx33d6XSaX9SGWn6mkRv/yzmbEazqSowyQ5Jo ckv/+EaPXkcil4YJKlFWKRCpI3R0DFuCkatvSXzBb/qo3VzEipuSAbPba2decKg5GjX+JFvzCjY13 8p0AYV+r1HdmRsCiFTBSXCLS4PaiyPOcWpuXgoEE0IQiFcnx9fm/vlOmtFRpBd+J89SK2FZJvTXlK r0s68t0Q==; Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hao Lee Cc: Michal Hocko , Linux MM , Johannes Weiner , vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Shakeel Butt , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML On Thu, Nov 25, 2021 at 11:24:02AM +0800, Hao Lee wrote: > On Thu, Nov 25, 2021 at 12:31 AM Michal Hocko wrote: > > We do batch currently so no single task should be > > able to monopolize the cpu for too long. Why this is not sufficient? > > uncharge and unref indeed take advantage of the batch process, but > del_from_lru needs more time to complete. Several tasks will contend > spinlock in the loop if nr is very large. Is SWAP_CLUSTER_MAX too large? Or does your architecture's spinlock implementation need to be fixed?