Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1379989rdb; Fri, 19 Jan 2024 18:40:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHH9RSjFONxihPgCS8LWDvwHEMfFCvoQC7r9KWFwsF+WExdsdGX3JzCVgmyrJI025NYjF1 X-Received: by 2002:a6b:6707:0:b0:7bf:43ad:21fd with SMTP id b7-20020a6b6707000000b007bf43ad21fdmr994520ioc.6.1705718423648; Fri, 19 Jan 2024 18:40:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705718423; cv=pass; d=google.com; s=arc-20160816; b=WrD3l778qX9HmY2hC8riblLPsAm+p0FR+ggKklTP4aeY607jIGu+ZSY/qfGN/x3g/C GuQyg+w0uFgSfCTkKDrl4j+4JW92GQ+7Sz/08eTv5EoIx23MAeIBHQyrVGoJrGTiYYj/ 2YocknxbqSBPrkqo0MQIDjuotr3ap8J/aW44roRTS9utzlRGkwczcaIPZwDIwMb0So0x reX58J5xXP/ybYElhSEGhFXnDwWNEwQQg35lZwt6HBPBACehbCQC3U9FLsQHiNX8LTyW N2XFtLp3Di/Kg0VfT/xuQ0ryhbOV0VMp6x5o2uky8AWDnAhHXikQjxW+4U5zjl/t1W85 HgBQ== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31679-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i11-20020a17090332cb00b001d726451474si1502006plr.205.2024.01.19.18.40.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 18:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31679-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31679-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2DCB9B22766 for ; Sat, 20 Jan 2024 02:40:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4223A10E8; Sat, 20 Jan 2024 02:40:13 +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 Content-Type: text/plain; charset="UTF-8" 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(-) -- 2.43.0.429.g432eaa2c6b-goog