Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1351176pxk; Fri, 2 Oct 2020 07:31:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqBBHE1+4BqpKRL01nSBnJFUhLl2H0V2kh3I9Ecnp8S7gYLfY3jclGANqmUct2H4ByuuuQ X-Received: by 2002:a17:907:33ca:: with SMTP id zk10mr2485606ejb.317.1601649111713; Fri, 02 Oct 2020 07:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601649111; cv=none; d=google.com; s=arc-20160816; b=bVCoD70vwKimND7CT2+elAv6d2FMpi76fTse2w/WCCyyZyoMYkAiGEtWcCxcSHs/iO WnVWrTozQcv/kqYZJhTgb8QfQFM6RO3v1EvkHHOPqTrhZJMMjNqJNClhg19GtUmkc2du QD5/O3DbryZiZu+1rjv4SAA8Y7QC3XZ1aUD+XTeSDKpO4LOgwCqKaEgIGHuRpxWRdb2T b4QsZI2hBVIBnReYsKjdHjsxO9LY0FFS8xu8p7HER9q9968EeMKG6RWjDqI+56sRo1ED GW48KmJpHPqPSSAbsyL1nE4vpDtLAR8OZpU4evoDaUMStmwcG7Yc/psijVJYSpwIjoml zSnA== 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=Ua3bCtpMycbDHDFeiy2dAsffKQu0yXXZ3KIokA2B8q4=; b=Tvcc9oGp/wTW3JhCH8XUYtfmIShhEJAP9nOQVo++jXa6OQHV1U7xc2uY5PpGadE9EC 37+XPChqR7+ShS/Z/ubC7j3TSobv66fYwHJPBC3YLnjjrWlM1zksFm70cbOcxnFqLzCx IUKZ8S9Cs6hoMta+VIxbZ15+gwClcCR7OW3qk54t05qyp7bCPJqDXzuVlKMsGAVtq97J xbuBXpNudCfdn1O/BJqCV5t4pIZ/Fy2oiRg+4Sz0EGEbJpwdbPGNZ34NHWr3L976EO5t bfn9R+aQbz8qFgir0o8EUcuGGw4t+IDKIGTITCRFCc1aFz94cypRAFI70LFxWGKBqMPr qmGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=u0hhZ0PV; 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 i15si1197985ejb.337.2020.10.02.07.31.27; Fri, 02 Oct 2020 07:31:51 -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=u0hhZ0PV; 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 S2388101AbgJBO3g (ORCPT + 99 others); Fri, 2 Oct 2020 10:29:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:60722 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgJBO3f (ORCPT ); Fri, 2 Oct 2020 10:29:35 -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=1601648974; 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=Ua3bCtpMycbDHDFeiy2dAsffKQu0yXXZ3KIokA2B8q4=; b=u0hhZ0PVogRAawGcVk2o7nQVX9xwDDm6JKBLkju3hRVK5Oe8UiB4ntqHBW4g5oAlVAUEw/ ZmHZ2tjVJumo2W6hMZTVFOMOLcRuS139dmitcl6y5WWDX+dWYFu/sn7FObiAs9hCflftVb i/2SaDn8/1KRVgAuLStNulNTsDmsK4U= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 22063ABBD; Fri, 2 Oct 2020 14:29:34 +0000 (UTC) Date: Fri, 2 Oct 2020 16:29:33 +0200 From: Michal Hocko To: Rik van Riel Cc: Sebastiaan Meijer , akpm@linux-foundation.org, buddy.lumpkin@oracle.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mgorman@suse.de, willy@infradead.org Subject: Re: [RFC PATCH 1/1] vmscan: Support multiple kswapd threads per node Message-ID: <20201002142933.GL4555@dhcp22.suse.cz> References: <20201001123032.GC22560@dhcp22.suse.cz> <20201002070333.GA21871@dhcp22.suse.cz> <656725362af9bd757a281f0799a0bb9c9b2487bd.camel@surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <656725362af9bd757a281f0799a0bb9c9b2487bd.camel@surriel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 02-10-20 09:53:05, Rik van Riel wrote: > On Fri, 2020-10-02 at 09:03 +0200, Michal Hocko wrote: > > 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? > > On systems with lots of very fast IO devices, we have > also seen kswapd take 100% CPU time without any zswap > in use. Do you have more details? Does the saturated kswapd lead to pre-mature direct reclaim? What is the saturated number of reclaimed pages per unit of time? Have you tried to play with this to see whether an additional worker would help? -- Michal Hocko SUSE Labs