From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A956C47258 for ; Wed, 31 Jan 2024 11:40:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67A0C8D0003; Wed, 31 Jan 2024 06:40:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 628708D0001; Wed, 31 Jan 2024 06:40:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C9008D0003; Wed, 31 Jan 2024 06:40:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 37E8E8D0001 for ; Wed, 31 Jan 2024 06:40:26 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E9F5E120BF8 for ; Wed, 31 Jan 2024 11:40:25 +0000 (UTC) X-FDA: 81739413210.01.1591E7A Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by imf24.hostedemail.com (Postfix) with ESMTP id E03D618000A for ; Wed, 31 Jan 2024 11:40:23 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=p4AA2OQT; spf=pass (imf24.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.173 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org; dmarc=pass (policy=none) header.from=cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706701224; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3Lzo33rYp/jHRN4zYc2SlNCqEW0zo3N4pWtMW5AZL7A=; b=L9/zGrlfzplp4H65gdmb1KoZeG8kZZ/1XNtNAF3mqFOV/qBubJeRDnvnPPlR61h9Ojgj+5 4zLYPMlcwoAMOITnY3YzMdAScSDzMxNP9HzUBuSkrsDPLUEfzWf8TEeveTfjdra4RkAaKY 7lhMWGiqNhxtq6U58d8xfkI/KV4G2Eg= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=p4AA2OQT; spf=pass (imf24.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.173 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org; dmarc=pass (policy=none) header.from=cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706701224; a=rsa-sha256; cv=none; b=DYOH5fwbVs74Szwd5d5rLQtA+0VzibY7OA6EK3PFEBGq+4d+CT18jTWLtr1+ZPDIucwW3V aODdJnMfTpt1w8UlzfqwHApOCfNg4ZvsPzLOde5xcnhwzPwl4D7GAQFfUUGW8pmRLDKzx1 UxcUkt90kRhUP/NVgQDswWKL0u1VV9w= Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-42a99202ae0so5561621cf.1 for ; Wed, 31 Jan 2024 03:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1706701223; x=1707306023; darn=kvack.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=3Lzo33rYp/jHRN4zYc2SlNCqEW0zo3N4pWtMW5AZL7A=; b=p4AA2OQTJURlPP6RkmnjOX1vEEY/+n71AtrzW7RQ9e1Gm6B8cKdfdy9tlkE4ywP1BE jXhgwv9faaHegJazHwU0ZQfWAhzNECxQL4FcWzpsyos2XyWg9mcNB5JroAwYmp2BTVr1 VjAh1LccmeTB0Kfy6CEaZp90Nsw7JROht4t5cc6NeTqvbEbA+irz8IFw280FLcYO9+En Uus/otorFPX6Jv2uuRxr8iWMM2Ivi9q4UHeCbgBw2Pp+2h/4wt+fKbJGq2g5eX/A9405 cM1Xsj55O/x+hDCC0IR7DMB/AWxmliCpxNr/0+KPqwZvamNsKUfKvIcVnhcfZEyJQKvk MqMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706701223; x=1707306023; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3Lzo33rYp/jHRN4zYc2SlNCqEW0zo3N4pWtMW5AZL7A=; b=hHcepJOTQPbn9LZ/1sQr5zxzXe4H2g3wH01E/BiL8Fwgyyb3vGPGt/mOPIvo3rgs/D 1bTS3Dbtg+K+Oh1mpE5ZOHReU/eFnOsl1UVsGnhERuX8afBWoJauKrWHykl3NHHoGFkZ qQowjxMlO+U0vpfrUjgL0+lS/ise47O/yjSrp7ojWyDYgBg+VwGHM2H8NxjeymaFKr0p aLBQ2jlo1CXyoX+8Hajn1xcTKkCSkJ/vW6ol/xdPAlMEPiIJ73orK/Ue/jI5zRxZYUmX Hno5WSFPwWUHT0HjJ3le5u6gp4NJuxcyvvz3NzC+Nq1Bbcvg7hhiNp+zWV4Y2IZMzefS WODQ== X-Gm-Message-State: AOJu0YxGTKAoXf/WDVI+77OiKAwFZuaIooX7iy7vEPeeQ/WC2PxtpSpD LvrlN9wVuMoC/cIhZdv0eLS3telg8/zMW2lbBM8+SgZ8g7ISNDU0CrrtGMAslQI= X-Google-Smtp-Source: AGHT+IHZHuDj0X9ZmM0ZA8QLxbNoD8yboDYYy0lIuwhvDcAy3bHX1G78dwqYdFflFTcQ9gLdUIou6A== X-Received: by 2002:a05:622a:1389:b0:42a:8a3e:4e86 with SMTP id o9-20020a05622a138900b0042a8a3e4e86mr4411430qtk.21.1706701222931; Wed, 31 Jan 2024 03:40:22 -0800 (PST) Received: from localhost (2603-7000-0c01-2716-da5e-d3ff-fee7-26e7.res6.spectrum.com. [2603:7000:c01:2716:da5e:d3ff:fee7:26e7]) by smtp.gmail.com with ESMTPSA id y19-20020a05622a005300b004181e5a724csm4800977qtw.88.2024.01.31.03.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 03:40:22 -0800 (PST) Date: Wed, 31 Jan 2024 06:40:17 -0500 From: Johannes Weiner To: Nhat Pham Cc: Andrew Morton , Yosry Ahmed , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/20] mm: zswap: function ordering: public lru api Message-ID: <20240131114017.GB1227330@cmpxchg.org> References: <20240130014208.565554-1-hannes@cmpxchg.org> <20240130014208.565554-15-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: E03D618000A X-Rspam-User: X-Stat-Signature: 53a4g3das6n1fkqt6gmic9ajd6xi46c9 X-Rspamd-Server: rspam01 X-HE-Tag: 1706701223-907574 X-HE-Meta: U2FsdGVkX18DpRP6J4lgI7rXfAKaSOgP5lQGCdufJe+ffVp0u14aDZa2TYfnHHnRS+HZucfsJQLQu7eh6NiS29roSL1aVsFC3shmIm9H/Vnc0N6LjZPFaVDTiEWjS5sZtANWKhw7XW5SkSae9/EY2/ZNVpp1FfDaLBUmxAQlXJ+ct4o1QMplOlkDXQXWl244L++Qq4qJ52BV+VTIhhXZV0BdhmQm3rcsjvQvM+/tn8i1KnV7ShPxxYZDCjApapfsCeprLeZieeiaD+5JKYw5T2HUzSeb2NgjnyLIFaWKxKuud643b5fAf2ZQ4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RjpPk1QkanttS5rXOdsgtL2QkeXqlHGCPV4wo3hnCrgvAXGzeYPP0XoojpsQF3c55EG0MsqFlnP0tFGQCQHBPCO8z/x404gFBsl0T8lSzvjSD+4fK0a3O9 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000021, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Jan 30, 2024 at 03:47:25PM -0800, Nhat Pham wrote: > On Mon, Jan 29, 2024 at 5:42 PM Johannes Weiner wrote: > > > > The zswap entry section sits awkwardly in the middle of LRU-related > > functions. Group the external LRU API functions first. > > > > Signed-off-by: Johannes Weiner > > --- > > mm/zswap.c | 37 +++++++++++++++++++------------------ > > 1 file changed, 19 insertions(+), 18 deletions(-) > > > > diff --git a/mm/zswap.c b/mm/zswap.c > > index e650fc587116..511bfafc1456 100644 > > --- a/mm/zswap.c > > +++ b/mm/zswap.c > > @@ -746,6 +746,10 @@ static int zswap_enabled_param_set(const char *val, > > return ret; > > } > > > > +/********************************* > > +* lru functions > > +**********************************/ > > + > > nit: looks like there are 2 "lru functions" headers after this patch? > You remove the "lruvec functions" header, then add another "lru > functions" header it seems. The next patch removes one of them, so end > result is fine I guess - just seems a bit odd. Yeah that's an artifact of trying to make git produce readable diffs. Since the lru functions are right next to the entry functions, I went through several attempts where it wouldn't generate clean moves but instead would interleave entry and lru functions line by line to overwrite one with the other in place. I think the above helped in making it not do that, although I'm not positive it would still be required in the final form of this patch. It was kind of brute force. > That asides: > Reviewed-by: Nhat Pham Thanks!