Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2570198rdb; Fri, 8 Dec 2023 11:58:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFu/renJ+7h/dYkNHXNQjUeALCUi15zOpI545pouRJViBg/7nUnnU8xpTSN0AHUJD90nvci X-Received: by 2002:a17:903:2290:b0:1d0:3f5e:d4c8 with SMTP id b16-20020a170903229000b001d03f5ed4c8mr755537plh.30.1702065526310; Fri, 08 Dec 2023 11:58:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702065526; cv=none; d=google.com; s=arc-20160816; b=TVwaN+OI9glOvzgeMdf2DsNzplAbB68rUMOCROsIGyXVTXA5s2XWRQuFIiUbcl9Pur N8bihtO6Q0LauK3aS/x9nCc3/mjc8beuMnBYeIjhz+JOeXBz5MlSCu/2cnzAdjYDu+h/ nXvb2g5Y/aEdCu1BebD8S/nLzRdboh72W639RBF7zog1IzjkfDsLXhqQWNldIPKjB6yJ T87PJYS+k3jiunIBtkyO9hZS9GJPW1rpNmAnReaznXa7MQER6WMtuZY3iuK158raKTez GuIQadb7q8bTlsxQRc1EVyCTKcrNrSMfO+HOadzAL3uPW2fq9jDqWApdfQ8yAWZuqBEi OHzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/qi7jtqCHgHnyy+FQeJLtuG8pZURCIrEHcEN/FCuVco=; fh=vMDBSbtyljwyQvQA3BaA46E8RH++M/D7OzCuTFMCT8w=; b=yC0dBxW5G0JJvb56Y9A605T2EnCTaZOu89o9R15hAMv8m7X3gNZOLzlX8KUv0BrhYF 1NAD5ebPzTZRh9tAaYITyUyrM+AaV95LCoKExeyOzMSdzEewTQkCRx1X8wF2IgUeARua h9RvEkowkhoFsEPjxmAY1p/sCLOYNkwBgXL/QT/LFwrXRi3DFssyJnambXlVk3eYxjdE UowrQZ/h+OYtl5HJb/L7B6kZEOor1aM+JPQVjDmFf78sbWRCfZ7+oMYzYz6DKNTeg2BT a+BGQrrp981sgmwmDCT79IFDLI47pjPO3v+qb+KBdmLNsWG3qMt4h8mSoH1fgCNB7wkY DgXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=BkptlubX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id iw15-20020a170903044f00b001cfd6baa008si2014498plb.511.2023.12.08.11.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 11:58:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=BkptlubX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 230EE83135A9; Fri, 8 Dec 2023 11:58:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234018AbjLHT6U (ORCPT + 99 others); Fri, 8 Dec 2023 14:58:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233991AbjLHT6R (ORCPT ); Fri, 8 Dec 2023 14:58:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2C510F1 for ; Fri, 8 Dec 2023 11:58:23 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96AB2C433C9; Fri, 8 Dec 2023 19:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1702065503; bh=l/xdBEqejIBDBfyrbxLDZm1aCPxAUkB5gCdqIhDScoo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BkptlubX345IW5aVCldqDNKuHbxUB1kJVmDDFs12+3s9hWGiS4nOhdxbnwGFTlL4c b0MUodgMFZkx7kX/z9mbw7HPggvGOg3lZ2gaXzro0cX9o4wPtmHcZVqdFb25kH6p+r XGr6FVQkDaYsRIcMTIPKTN/TE3YPPVeYWHuEroow= Date: Fri, 8 Dec 2023 11:58:21 -0800 From: Andrew Morton To: Nhat Pham Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org, cerasuolodomenico@gmail.com, yosryahmed@google.com, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com, mhocko@kernel.org, roman.gushchin@linux.dev, shakeelb@google.com, muchun.song@linux.dev, hughd@google.com, corbet@lwn.net, konrad.wilk@oracle.com, senozhatsky@chromium.org, rppt@kernel.org, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, david@ixit.cz, chrisl@kernel.org Subject: Re: [PATCH v6] zswap: memcontrol: implement zswap writeback disabling Message-Id: <20231208115821.402176c9e37ab11470a8656d@linux-foundation.org> In-Reply-To: References: <20231207192406.3809579-1-nphamcs@gmail.com> <20231207141142.307745be167d044b0eec1b42@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 11:58:44 -0800 (PST) On Thu, 7 Dec 2023 17:14:22 -0800 Nhat Pham wrote: > > I don't have any concrete numbers though - any numbers I can pull out > > are from highly artificial tasks that only serve to test the > > correctness aspect of the implementation. zswap.writeback disablement > > would of course be faster in these situations (up to 33%!!!!) - but > > that's basically just saying HDD is slow. Which is not very > > informative or surprising, so I did not include it in the changelog. > > For instance, on a server with HDD, I allocate memories and populate > them with random values (so that zswap store will always fail), and > specify memory.high low enough to trigger reclaim. The time it takes > to allocate the memories and just read through it a couple of times > (doing silly things like computing the values' average etc.): > > zswap.writeback disabled: > real 0m30.537s > user 0m23.687s > sys 0m6.637s > 0 pages swapped in > 0 pages swapped out > > zswap.writeback enabled: > real 0m45.061s > user 0m24.310s > sys 0m8.892s > 712686 pages swapped in > 461093 pages swapped out > > (the last two lines are from vmstat -s). I pasted that also.