Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1599025rdb; Wed, 31 Jan 2024 03:46:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHglf+WtelnrMA01isRjw8FgB8SpVX33SDKmrlSj8COmonrMENYuf5CxIj4bsBLUk/ESNnR X-Received: by 2002:a05:6a20:878a:b0:19c:9feb:3b03 with SMTP id g10-20020a056a20878a00b0019c9feb3b03mr3771376pzf.55.1706701600439; Wed, 31 Jan 2024 03:46:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706701600; cv=pass; d=google.com; s=arc-20160816; b=XRXvN2BtptN2cCatqrigIRww13i6huRdnLAcDGXZv8N+o9HcNLxcxFArx3G4LRK0+x g6LXAmG4LusLwKI6+l+ueDIxLHXjgdqzHF0GA8Pr2Y6k3ahlHGf0u0VrWP32GixGeAzk JILM8wXSHDizhp5pmp9lTplU1LgI9EKz9GtsPEOdnIQsjamaokK/K8d2AjvFV67dPzqX 0GUyCDku8yHAhoPXUQ5N8Npj920Yd4uiUBpACaUg9TizmCI7aCBAbmcr985ypjUDn11/ Iym6/QytwHseHHBmlCPgOX+oGfQywt6DK/muMBVxCmpblz4jO6FSSfyACMGnVgPPfjsp hERA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3Lzo33rYp/jHRN4zYc2SlNCqEW0zo3N4pWtMW5AZL7A=; fh=hagYJ8REcqdYWjx5duHROExynyGIhIB4HAsDOWprgLg=; b=YMh8j5bel9gu5rFHNHJfi8mFZVhSp3OYnDfOgU4lNqPqjgsd1itFG4W5PFJZtHVmN7 4YylY5QxnLQj3igCyxyqCzmIK85Gfkl7Gu2mIkRli4mtlWWGCc18CZRg5k1yhqcGx/Qp FxGu802MP8MtsHGQyuWP+L+FDq6478NKtnGz+rOgjM8e4SIorIxkTtfLZdQg1VTNW8xK Ino3UZzenqh3qIZXuHSwDZGfhWZzwBb+EkRfIqYyEQW3CGUcOIKJTgFqVR2fTwSii+yk T6dn4Y1jWXVtRtxMOiTfHR9390+aFIhpEd2C5GEDtNIAvjfX6OlZMOGxIEUvZjY3x4z+ L1aA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=K9+h5sgb; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-46374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org X-Forwarded-Encrypted: i=1; AJvYcCWLp4qU/Q3sAlKJwYKYMUrN6pEXMgnt89OfARCWw/RxPUfU19PeyKjDJjYgBiqoXq8Yt2fj7INQikQGmQxo4T1kHXVHLga5r2w0ZsIcRQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g18-20020aa78752000000b006dde1386a04si9172770pfo.398.2024.01.31.03.46.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 03:46:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=K9+h5sgb; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-46374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id ACD552902B8 for ; Wed, 31 Jan 2024 11:41:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50C7C78B6D; Wed, 31 Jan 2024 11:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="K9+h5sgb" Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 4CCAC69E08 for ; Wed, 31 Jan 2024 11:40:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706701227; cv=none; b=ikNYC67CXf7w+jZZ4h3/4ad4t+NpFaMn6RLncY1d14ZlJSCts1uTVKkV9FB/WVH6pZz6J6omtqzvBvEFxC7PgaNK0MgXk8YC1At6tjuQi+5sEpNOONt+DG9KiBy9G2TjJ6A0Ct02jvv6iM0BC9w4quqjV2lss5kY1Q6x/HqVr+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706701227; c=relaxed/simple; bh=gxRETUAO4ejfNPS9THFytRMFDZ4PEG1BBW8DTBF2OTQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D4rci41jrLJF1/1XJpNJ5o+K8wNk1Cuk0lOocRjHsFQmYfqUlAy1VWjqJ0qb/rE3MuwPMdeXYkzoW71r2h9RoZ3PBjvsMLz/nonK6w9p/h3rD8J1jqWzgq7/0JUZpxjL2zISLEenKQXgGM5MBwiz/XdScTReGjQom109rfPA2NM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=K9+h5sgb; arc=none smtp.client-ip=209.85.160.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-42a9f4935a6so6090231cf.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=vger.kernel.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=K9+h5sgbxMFnHFkiVV4RtCf7AvCbz5yrqQolL+7Wx6bpvXJ1SiAapQJjWTcCaId6qW 10/uDpM3WtO+Z0rWZInNEegS1WYeeGjtUfsicc1Zx8OavmVDkRo2MPYUGVju4BTOz1iD lxFnXlwTJM97RyPNXghDgzjS54GIchFYhm+ufSHSJYIc8W1IzIlyOHsegnOM+WtuPr8c CR7+8YIkQsIjp0BXT3rPbvcSpNiSWzB6XX0H14CbeTYWajAOvIpp23JxVxNzzjC4Nyn8 ClbWnh9KOpmrnLukMHJl3eyTJ+KFDNW/+gkdWNRFy7UFzIvs6Pgk2P30HtlUZARx7viX s9Tw== 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=Zfoe+I2tKEmQYXrEQCQDh9pmjXsy5InuOyjhz9BJTQh6oGFQOKUpJotj0H6ML4JeBY YwTuWJ3/UPPb4JmsknYnpddOK6XzQpPaGtfOn7V+SV410Oj2BWpkkXCqPxb+9aodZpPX Rk7qUrxljCROvsMImyTaGkLLBlfzunKoVcDoVAWsEeUEbicUsslwjGfmkZgD8IsexDB/ EVNrpPn3hKMC30oUP4nipDkg8kU/bfVTR72A09nI1mWgNpWvhhm3vxDF1D0Lvg45D/j/ TbXidD3nxedFOI5avpoFzhDBeJ0UuPuTOJ639FUSLv7FWjxJaLd4xKWXH4cGWnO0kMqj 6e9Q== X-Gm-Message-State: AOJu0YwAReaB+Z7wWtkr8eLjUHNPzl+gOv1SwynLu0Uu94GNUJnVoo0g tNhiDEFJJi67A/g57MpXlx7ItU0IxCo4/YqRnVNhx+bJFzu/NInX2N1ZFK2VEWk= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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!