Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1085532pxk; Fri, 2 Oct 2020 00:05:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd6hNxP+sPZ473V+rtcK69MexFpnLRK0ZnU2OzY6uyK9D4u1WElAvkpWEPsd6HtrAAR3GN X-Received: by 2002:a17:906:fb8c:: with SMTP id lr12mr880123ejb.9.1601622321944; Fri, 02 Oct 2020 00:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601622321; cv=none; d=google.com; s=arc-20160816; b=yvdu7xYNlFLuJQe8lkg1UQnc+H4GwMvezjtWLHR1/FBhGoptEnpzCIeD9KSBdj1vUT q99qbkrqVPrLdrPLGa9yabsUyemM0HYctXqaxwOlpZgiSqBbdSS0N49HNnZQScVhCWIO 3wJdDinHPgL3KxLjlTNFo4Moi7FRvGdcnykEKNOFYEG439H03hFglulifoOuavTpdtoj d9WfNIXxNahrCHKuWTpZ8luvo9sKnLcMNncuCSpWRlxYs2Hrfi1mf5X5kRfR4DRGMzlB lCtshe0NaP3jcQiNIfhaVgeDlsV4zfYROomZl7prUeSi9kHoyb8DPRr+qTEmP2IYSEUp 947Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+4u/qRf9+kmqLyGtcPDIuQ13T83PRssmDQWjttbaB8g=; b=xmGD8r9bxecotC+ScIxCn5vOiXSJkgjjjAbEHYAxQ8kZBnLLykah0CzdP10GaTXAzE jwRcu9zqOE+/y/MVLYqcSQ5pUSYdFMxwiOMQL1wbf117OxupT1t+lM1y/LvUemgKqBpY vIPTDfR+RLP0z9FCQeYj2TM7pAUUjaSByH3meH8dl7EfPQK7A6vYJlWeVOzUJdPPMfEL Brhr3Cv3FCwLqgL+7H3UTdis7FGwjY5J/k2hFfil0pw2c6ox41tJGhzaXvFXjID6vt02 175wBMEQJw0GEPVwAmdNrmsVZgr/VUkOQHLu37XVPj15obLNf5dJBNnGKB+N0mYtEJIq xVLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=CtrW5dsO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o15si449426edi.64.2020.10.02.00.04.58; Fri, 02 Oct 2020 00:05:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=CtrW5dsO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726075AbgJBHDg (ORCPT + 99 others); Fri, 2 Oct 2020 03:03:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:40138 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbgJBHDg (ORCPT ); Fri, 2 Oct 2020 03:03:36 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601622214; h=from:from:reply-to:subject:subject: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=+4u/qRf9+kmqLyGtcPDIuQ13T83PRssmDQWjttbaB8g=; b=CtrW5dsO9U4JusMQ9BY4WwzEJiEyix+lp6gWqHhhJctMaDT6LSuhVp4HmtV0b16QTqP9GW Oz7jfYbV8zH/FZIjI9ufUe9OHvQmJYIMR7csydO3ZwwLXitYJTf/U3iMEqDrTslQjhmtJz df9/UaOsoF0qOKqhVQdDIIw5aS2rB4U= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CD644B1D0; Fri, 2 Oct 2020 07:03:34 +0000 (UTC) Date: Fri, 2 Oct 2020 09:03:33 +0200 From: Michal Hocko To: Sebastiaan Meijer Cc: akpm@linux-foundation.org, buddy.lumpkin@oracle.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mgorman@suse.de, riel@surriel.com, willy@infradead.org Subject: Re: [RFC PATCH 1/1] vmscan: Support multiple kswapd threads per node Message-ID: <20201002070333.GA21871@dhcp22.suse.cz> References: <20201001123032.GC22560@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 01-10-20 18:18:10, Sebastiaan Meijer wrote: > (Apologies for messing up the mailing list thread, Gmail had fooled me into > believing that it properly picked up the thread) > > On Thu, 1 Oct 2020 at 14:30, Michal Hocko wrote: > > > > On Wed 30-09-20 21:27:12, Sebastiaan Meijer wrote: > > > > yes it shows the bottleneck but it is quite artificial. Read data is > > > > usually processed and/or written back and that changes the picture a > > > > lot. > > > Apologies for reviving an ancient thread (and apologies in advance for my lack > > > of knowledge on how mailing lists work), but I'd like to offer up another > > > reason why merging this might be a good idea. > > > > > > From what I understand, zswap runs its compression on the same kswapd thread, > > > limiting it to a single thread for compression. Given enough processing power, > > > zswap can get great throughput using heavier compression algorithms like zstd, > > > but this is currently greatly limited by the lack of threading. > > > > Isn't this a problem of the zswap implementation rather than general > > kswapd reclaim? Why zswap doesn't do the same as normal swap out in a > > context outside of the reclaim? > > I wouldn't be able to tell you, the documentation on zswap is fairly limited > from what I've found. I would recommend you to talk to zswap maintainers. Describing your problem and suggesting to offload the heavy lifting into a separate context like the standard swap IO does. You are not the only one to hit this problem http://lkml.kernel.org/r/CALvZod43VXKZ3StaGXK_EZG_fKcW3v3=cEYOWFwp4HNJpOOf8g@mail.gmail.com. Ccing Shakeel on such an email might help you to give more usecases. > > My recollection of the particular patch is dimm but I do remember it > > tried to add more kswapd threads which would just paper over the problem > > you are seein rather than solve it. > > Yeah, that's exactly what it does, just adding more kswap threads. Which is far from trivial because it has its side effects on the over system balanc. See my reply to the original request and the follow up discussion. I am not saying this is impossible to achieve and tune properly but it is certainly non trivial and it would require a really strong justification. -- Michal Hocko SUSE Labs