Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1054571lqs; Fri, 14 Jun 2024 13:24:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWOuiGwHMq+E0UrUJHShHb++ngxcxMSEWPYk8kOmadJf8gWIiyfzH65km0qt1aSeQ6mOTNZ52BEpc9HKxU4iKCSl2hD7KYcs5UcPDMdNg== X-Google-Smtp-Source: AGHT+IHCDsq5CGHJwSiz52iLU5TpwN1s+R0tddWpTiGrXt8pOw2Q+q/yl0i0hwavCQBBctI5V3mX X-Received: by 2002:a50:ab4a:0:b0:578:6c19:4801 with SMTP id 4fb4d7f45d1cf-57cbd6a70e9mr2439495a12.22.1718396653371; Fri, 14 Jun 2024 13:24:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718396653; cv=pass; d=google.com; s=arc-20160816; b=C0CRy8wBM+OLnWvIBrMtdaVn8r5VrPUAQyWXewMldZPh/sL3qh7QHhPp8C294G8OB5 IpgifLnw7+A34t6VILdftkiazKzfE9qPJs7nYY9M12Ghq6T+VL4dlF21V02rkxpCAznW XowAnzhLENYZmZ2zarhwoz/UwLoFxIF7XXEmW169TGd+Cb/jLCMsWuUt9yvycZ+d7ffV zXjj0/nIz1wCE3B3J7Dnpc3YNKIT0QAmsCkWUe/xuP85T9ROgrE1iEKQfxEsSKrMHgce Zoc72PH5/PHA6EI6L1edulo1xmMkjxxKcLQOxFOJz2nASmSHs7JcgNWvNrmJFcLOFp3n 7aMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ZWrw3butiWjOLPjkXlESkdz/5W+n6p0ka63sDmIgbZQ=; fh=e5BqU0I4pgGa5eqxOqbIWNIvbVXBoObDYXpTP5Nm+oA=; b=RP/S8akJ7ZEB9gGZ9AXiVWkz6LgWEHzm4ViOihbLMkcoejbBCFctUiH2usGkYLxLsd T8J36RYBxBOumzirg36vNqSEnNHGeGxU75LRS4yA8jORy61I33/yK3wautgrY/WxDoze kJb4LuhroUUIVhOCVydoFSXki+QxvGA+0YPoFhfI0nGfhV63xfl9e9TLZtheL5RBoT++ SSQs/Q+OqOKXff/M0y8R3+9nOEWP1aUYDrQPHw+l2j+lX/M6QRxzf3HnC1FhMVg+a70J 8CNz6bFZTCMSR0+9yEd+HI+arwxVZwizJT/Yvk1rWP8iQV0ubsDxyfmKQgdtKrpdCMgj /R2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GJgilkFU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb72d66b7si2139787a12.133.2024.06.14.13.24.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 13:24:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GJgilkFU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-215477-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0BC311F2261F for ; Fri, 14 Jun 2024 20:24:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 057DE16E87C; Fri, 14 Jun 2024 20:24:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GJgilkFU" Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D57A760DFA for ; Fri, 14 Jun 2024 20:24:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718396646; cv=none; b=bAVxHvjpWJzH+TOLmbyD+z2NHz6hgJ/kwas7AWoySavRQmd3bTOd0DsKKMXa7QTULhVzYFnzXcjoP58XXNoqKYWjczbDYy9igpndjLZPm7ZSBA+YAk17KeBqwdh+H2s5SX+o9oAr+XfUJziZmwDSG2eXK18FlpDFkY6Lozk2Txs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718396646; c=relaxed/simple; bh=ZWrw3butiWjOLPjkXlESkdz/5W+n6p0ka63sDmIgbZQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fkTiO9SV25VIfXSFU0uJiPdbxh6O8oZyejbjNyoVtRLxiUnlqD+8Bm4Gnh7IicQBS9D6KE1JMe4y/iWDA1/cLivtIqFtW9Ji7yAcZGXHSCevY03i/8s8b5MfMOh18z/1++uChnyiTHHG8pn5YP2XOyvlssT5ZOiaSryzB/RGYio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GJgilkFU; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6b06b78e716so16296716d6.3 for ; Fri, 14 Jun 2024 13:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718396644; x=1719001444; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZWrw3butiWjOLPjkXlESkdz/5W+n6p0ka63sDmIgbZQ=; b=GJgilkFUKkh7mvZiUE/qBW/xKjgoM8Wfu43UrMddiqckRjdnY64xtF0pgfs4YYx8Vc 8QmrMe15xVWDEen96/1MbMNe2FYN7ftWQ9w/W2ungeFNZJLLkMXtWhQ5zmvtcUSWvimA ojx+TbVFXVaY0BUo5o+jml+mrPz35lnn3ltEgcqmY414iJ+EuGcdqDDvs2vWVaiCvO3R zXXiFyefPFPa7Uj1RzIPRMK6kg8m/1hRu2HbiOg2ZPvXwFrYrxIxuNo+hQK2KGO3EPgF fnrWCkdZ3+GngP4h2FgthBWDzdgdtJtR6EqRit3s7iOQj7V+EW2A7YGFVN+gyOn8v/Hz 7I0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718396644; x=1719001444; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZWrw3butiWjOLPjkXlESkdz/5W+n6p0ka63sDmIgbZQ=; b=i3Phv+sQkE9sc53uW8MuyKqkjYPf8ox+aJZiZRePBJjjdXalPsM98wxenkmMPhEoD9 XAJiN2lnhBdrLMC8TNZJndfvyT7dXpg9D3hQuONioUL81qxlwkyc9xDSzO3pjXOc/7pV qx9rfN2o5Jygr4hDN6vwAbBlpMBnqu2lMCZlWqXTBgdJ4WAZghBwzz7ciE0uMbvOYP4q DDP0bsRG7nLaRr1R/rwcHkHpbnAMsQs7p6JCW42wEudFOvDJ34gDL26F6n7cTVQj3hsO ul6v76ZZUK/dCyVaEsiEJTtb9VwXHGwdzzJPJ1IvR1hIcKb/wEq6tHTUWmicMRnqJkNe LmBw== X-Forwarded-Encrypted: i=1; AJvYcCUZk8u5ww5PHK2sQSrQ6ywSC/mMVMzzDehIvjMTACtzoMIY0GFBvSz5mJIzOoeDC4ls2ALbv4rZT2Q6Ru1C2Zqq9MRrOebC5AnJYVsX X-Gm-Message-State: AOJu0YzjcYVIZN9KBgkufqXCIB/dAatVm5myZf4g5qtoUM1bp6TPr5zc ZduA6WOsI5T6/UykUm7aaiucsb5TamxqEkjclXvbr/BxMCb37rsb0/ndZxj3kPTti29ic26518u 2HXsB7enGY/hmIODx00EVW+mI8uqQkg== X-Received: by 2002:ad4:4e82:0:b0:6b0:789f:9ce2 with SMTP id 6a1803df08f44-6b2afc7931dmr35757836d6.2.1718396643629; Fri, 14 Jun 2024 13:24:03 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240614100902.3469724-1-usamaarif642@gmail.com> <20240614100902.3469724-2-usamaarif642@gmail.com> In-Reply-To: <20240614100902.3469724-2-usamaarif642@gmail.com> From: Nhat Pham Date: Fri, 14 Jun 2024 13:23:52 -0700 Message-ID: Subject: Re: [PATCH v5 1/2] mm: store zero pages to be swapped out in a bitmap To: Usama Arif Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, shakeel.butt@linux.dev, david@redhat.com, ying.huang@intel.com, hughd@google.com, willy@infradead.org, yosryahmed@google.com, chengming.zhou@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 14, 2024 at 3:09=E2=80=AFAM Usama Arif = wrote: > > Approximately 10-20% of pages to be swapped out are zero pages [1]. > Rather than reading/writing these pages to flash resulting > in increased I/O and flash wear, a bitmap can be used to mark these > pages as zero at write time, and the pages can be filled at > read time if the bit corresponding to the page is set. > With this patch, NVMe writes in Meta server fleet decreased > by almost 10% with conventional swap setup (zswap disabled). > > [1] https://lore.kernel.org/all/20171018104832epcms5p1b2232e2236258de3d03= d1344dde9fce0@epcms5p1/ > > Signed-off-by: Usama Arif I like this version a lot :) Really clean. Reviewed-by: Nhat Pham