From patchwork Sat Jan 20 02:40:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yosry Ahmed X-Patchwork-Id: 19200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1406534dyb; Fri, 19 Jan 2024 18:40:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHP/XjVz4aHdvyco8grLuR6DLX4O3DqDzU92oxZo6lsej8cqHwDoxevPzmFNSjT38jNAiH9 X-Received: by 2002:a05:600c:b93:b0:40e:4579:9eb1 with SMTP id fl19-20020a05600c0b9300b0040e45799eb1mr315409wmb.1.1705718432423; Fri, 19 Jan 2024 18:40:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705718432; cv=pass; d=google.com; s=arc-20160816; b=g3JYzzwo8AnblodciGBYvddcOCWcR5E6uKaAvfbWdSdkEXllaoJvJWS2Lxg9XAx2Nk C4QOD8XNkNa153Wi2UuXeOTpir1GrcFy2l4xjf/tqPpAWf8RjKXiVmrj/vt6WWF2b6O4 4548TimSQEQndW9rtItSuWjncpovwVtiSroEtjOHTM9xts587OUuuW4cWBoxPDULpnAV 0AeRIVk9r8qzkHc7Sdpi0BUjaee0/DVFpi99QChD0CEZFMYy5FMmDA1zyuKAhbIzJgc1 CdCfq6NDIkh/xA2LfGWk2M+/5sEjBi85GJu/31D2bbEtO6k5fohgqlrlaAkqS/vfKuYL eJZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=nM+uM5keP1vVbVBzlI6j6cI4oG9iDGk+mwAqUBofyJA=; fh=2fp47O5heT9ZSY23GxUI23pZ77ANaQPj9zY0xLvYULg=; b=tYXnIgONU3YJG1U2nke2yJlh9/CK5AOULCdLbXg/62C9OYiRrsMrLs1q9zpMPzEyNk 0Sf/xp6Vyjv3jZOlLL5M4COhM8w3HLA7vpWIF+0P3+JzffN9fQiNXa0nx3lxfsX/BCwC oSKA8dSkeK/caRvHaT6EI3EbheNart1BZPdVCYlpOPK6PtWbunIS9s+dxYFxrsUBMPRb coJK6QVYcWNnb1DUHXZFrwylFG7bgpbPvt+cBf4kd23jEE5e0ppPAq4+W6tWWFlAAwHF kVG3V64a6N2uYpxsRwCqQgwviCTuYicqiu2CCmpGs78qQJVWMJtYcZ2bR02TTVGMK6Eo yS/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Rlojni0V; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-31679-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31679-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w4-20020a170906130400b00a2c56489136si8493018ejb.951.2024.01.19.18.40.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 18:40:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31679-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Rlojni0V; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-31679-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31679-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 0DEE91F2207C for ; Sat, 20 Jan 2024 02:40:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A66817C1; Sat, 20 Jan 2024 02:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Rlojni0V" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 2A0D0EBC for ; Sat, 20 Jan 2024 02:40:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705718412; cv=none; b=JcbEkF91k9mIt2kUk7AAAfmzZX04dYcpKrMX5xoonL+GBLI5I9Io7T81T+jf9XLz6c6apKEEnT/JLx0secSixUadvhL0aOiC2BerVBsPog7pCQwNGdk6jfKXX2S8S/APDtxKUjHg19n6iLAkC24cMK1Batjxwa0Oiz8e80KX5KY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705718412; c=relaxed/simple; bh=KSbnvy4sJIwSCyWI6YElLaEZDcNX9o4TzCcmRIx6GrY=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=DZoqGQZnkav5HPzu36XQA79tojYHyiTbd3clNaHvNNhcZ+NmjHx/wgA/4xClQSs49RTMIn65CG0DojCYSIEXb8d1TO/K7wgw0HsXlVduGE7cSepAeWGsB51l4ug2QUKdQgzjDP/4HNeNnCnSMuAmtT7iH0JabER0UlbVvBOLrRM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Rlojni0V; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dbcd9f4396eso2236636276.0 for ; Fri, 19 Jan 2024 18:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705718410; x=1706323210; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=nM+uM5keP1vVbVBzlI6j6cI4oG9iDGk+mwAqUBofyJA=; b=Rlojni0Vh69Dk3HyH4rbQ1LqiI05ArzJcu5zJIthyGVZ51H/5K1hf3DJ3gLGbm9ItX EruLnUSx7HV85Nqn06uxFxBb061LoysAZ5MV4nihqGt1pOEeLL7ekJpBSFrfvkgBO+D3 5pychlrmz83vOyrPYVn4L7EWevx32/duW+kfRbWw0rX/e9O9/r3Ex6WXp7tUY+YX9Wnm Z6FuAlRXOayMh/Ake7gHQmBnL2VvJ4rXwNw/dwktyr9gKukz1RA8stTyTWPQJLr2iv16 Igy3z0xGtrvABzHfu7Vj4EunF9iZyL33mPQ/NTjWYuXrYYc5cpYaMHaYek14K/4b8eUD 3h8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705718410; x=1706323210; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nM+uM5keP1vVbVBzlI6j6cI4oG9iDGk+mwAqUBofyJA=; b=TFPPE7je+l/CLxoHyT8mvvsW06gvHoDl7S1Mo7Ep70kiztkgKYl+9l544my1cTHJRH BBREFPZxzZ0LKNMD9waIfIB6PpbwKfiUhTd4izWkwNASCtNgOtiW7bCHi0zzlfSezZVo 9nkyC5wDz8Z3snXJJ09EJDz/eukK+HWoruul4ZJJLaGKPRkVSdLDHhFegItNwTAAyU9Q 9Env748Jw9LNi6L6okzMDf5cPQM38/qMXEsrdqZt9XO3/3lx5pE4R/x2gwEyM3UwLUOq V0mVVjS5chlK1oXNTXzH9lf8dPAc7E2nImgOlzImcrN5hdhygKMqrTV3M2BHIHa/UPeM o3ZA== X-Gm-Message-State: AOJu0YxIbAY+ZQrg0+Xs9royCO8pBiOUDKO7fyJy5LNQHQoNakFE8H7+ A9oiS+Uz55quq8vZGzXzy9wApUkWF2ughKwxFiJcp+DL77g9g2gktf0ZU+oOBe2aydjcbfPoCOZ a4/Mg18EC88EV5B6/fA== X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:29b4]) (user=yosryahmed job=sendgmr) by 2002:a05:6902:86:b0:dbe:a214:888c with SMTP id h6-20020a056902008600b00dbea214888cmr423251ybs.11.1705718410258; Fri, 19 Jan 2024 18:40:10 -0800 (PST) Date: Sat, 20 Jan 2024 02:40:05 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Message-ID: <20240120024007.2850671-1-yosryahmed@google.com> Subject: [PATCH 0/2] mm: zswap: simplify zswap_swapoff() From: Yosry Ahmed To: Andrew Morton Cc: Johannes Weiner , Nhat Pham , Chris Li , Chengming Zhou , Huang Ying , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yosry Ahmed X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788575410865131317 X-GMAIL-MSGID: 1788575410865131317 This mini-series simplifies aims to zswap_swapoff(), which should simplify in progress work touching it (zswap tree split, rbtree to xarray conversion). Patch 1 is a code readability change in the core swap code that makes patch 2 (the actual simplification) more obviously correct. Yosry Ahmed (2): mm: swap: update inuse_pages after all cleanups are done mm: zswap: remove unnecessary tree cleanups in zswap_swapoff() mm/swapfile.c | 4 ++-- mm/zswap.c | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-)