From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77B6B379C5E; Tue, 12 May 2026 07:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778570432; cv=none; b=W0wNDpy7IWhlgxGAl4BUKSY5jP4NfI48FBVAdHdkk4sczHPWtiVdaM0ChFdyBG557c1+ZRa4Hy3v+5Zv8ypSjVEvGyu6IN5M+WHIiRPBjEiHfQRKYjcdmjeZu9oWiwjoXutb3IvUuAkD2wUC3c6/j+wX9bnJOdlAgHDFFH7vkmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778570432; c=relaxed/simple; bh=WO5TyXSQt3jZoSF/CLHx8igk7yg6Gis1Q53sIKXHzJk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=chrVct6NfREA0uQhR96K1D1wXwv6zcux6n7XQfglxQdmPnHv+L8tvutOMjgeukIF1QHO73BP+U9tZT+S1ihOPADkTcZcqLXXh/xPP+H5ybClbbrLIwNAMTus9VdzAngf4K/J5a97I0NgSqWbES9Mr88xXD1tWuhvM0dTBv4+ONk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id EB1E668B05; Tue, 12 May 2026 09:20:22 +0200 (CEST) Date: Tue, 12 May 2026 09:20:22 +0200 From: Christoph Hellwig To: Damien Le Moal Cc: Christoph Hellwig , Andrew Morton , Chris Li , Kairui Song , Christian Brauner , "Darrick J . Wong" , Jens Axboe , David Sterba , Theodore Ts'o , Jaegeuk Kim , Chao Yu , Trond Myklebust , Anna Schumaker , Namjae Jeon , Hyunchul Lee , Steve French , Paulo Alcantara , Carlos Maiolino , Naohiro Aota , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org Subject: Re: [PATCH 01/12] swap: remove the maxpages variable in sys_swapon Message-ID: <20260512072022.GA32622@lst.de> References: <20260512053625.2950900-1-hch@lst.de> <20260512053625.2950900-2-hch@lst.de> <03dddf72-8755-4ebf-ba79-456377f0f25d@kernel.org> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <03dddf72-8755-4ebf-ba79-456377f0f25d@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, May 12, 2026 at 04:08:35PM +0900, Damien Le Moal wrote: > On 5/12/26 14:35, Christoph Hellwig wrote: > > Always use si->max which is updated setup_swap_extents instead of copying > > into and out of maxpages. > > Checking mm/swapfile.c, I see s->max being set only in swapon(). Is this a typo > or am I misunderstanding this sentence ? It is updated by the file system methods or the generic implementation called by setup_swap_extents currently. So the above is a bit imprecise. The next patch then removes this confusing update. 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08B32CD4F26 for ; Tue, 12 May 2026 07:21:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5utzbNgJUqhbovmaswsebED5OCIejuoJ2dbHpCZR/zQ=; b=gK4msfsaBT/NRJk2Jf/SndV2rT Bs7Hc/RAma7SZl11pnqzO0UYu2S4RFIWQdkAjWkgbpbfybnrpLrS+1hBfIrenZW29jBdhhzcgpfh+ igVo8T6exscxaQW1cjDaytw9EmVNp5vVNRFFUSMX9RG7iQf9ytS40YqUaCprX99WVeDM=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wMhQO-0005KR-6T; Tue, 12 May 2026 07:21:04 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wMhQL-0005Jm-3X for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 May 2026 07:21:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pMTiTFWiENQamzxHXmbPJRlT0qzqpOu+k05ZoAu8TSw=; b=R/c1vnYRbWYJcPBcD6b40afskb 8r6/yw6WeacZDMnVcmpR4ujbMBubIxnBL7x6tmMyeMUl98Z8G1x+ako1XQua3qWNvyBOGpknmdPod xl5uuKJdHfy/PglMpQGb0dVZN43orqmG+OFvqX8KK6tJ3iTXdAQtQNqWq+jCqmydU7aA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pMTiTFWiENQamzxHXmbPJRlT0qzqpOu+k05ZoAu8TSw=; b=k/XFcbqIP39y+gjMh7afDGmQPj dXg3H1qpWIhGGaIbZcTtdjBWg6CwZSVKDCF1DoNeYQgEK0XUNNLIj8dbteC9Okqm7jl7BjrUX/6FA +pZRG7GvuYH6EdCXtQwM8GHAVTS7zsVmmgflXE3RNoziDQDZkNk2GH7N5sGDLFRl7zIg=; Received: from verein.lst.de ([213.95.11.211]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wMhPv-0001dA-Qf for linux-f2fs-devel@lists.sourceforge.net; Tue, 12 May 2026 07:20:38 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id EB1E668B05; Tue, 12 May 2026 09:20:22 +0200 (CEST) Date: Tue, 12 May 2026 09:20:22 +0200 From: Christoph Hellwig To: Damien Le Moal Message-ID: <20260512072022.GA32622@lst.de> References: <20260512053625.2950900-1-hch@lst.de> <20260512053625.2950900-2-hch@lst.de> <03dddf72-8755-4ebf-ba79-456377f0f25d@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <03dddf72-8755-4ebf-ba79-456377f0f25d@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Headers-End: 1wMhPv-0001dA-Qf Subject: Re: [f2fs-dev] [PATCH 01/12] swap: remove the maxpages variable in sys_swapon X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paulo Alcantara , linux-doc@vger.kernel.org, "Darrick J . Wong" , Carlos Maiolino , Hyunchul Lee , linux-mm@kvack.org, Christoph Hellwig , Naohiro Aota , linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Namjae Jeon , Chris Li , linux-nfs@vger.kernel.org, linux-block@vger.kernel.org, David Sterba , Jaegeuk Kim , Jens Axboe , Christian Brauner , Kairui Song , Theodore Ts'o , linux-cifs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Steve French , linux-btrfs@vger.kernel.org, Anna Schumaker , linux-fsdevel@vger.kernel.org, Andrew Morton , Trond Myklebust Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Tue, May 12, 2026 at 04:08:35PM +0900, Damien Le Moal wrote: > On 5/12/26 14:35, Christoph Hellwig wrote: > > Always use si->max which is updated setup_swap_extents instead of copying > > into and out of maxpages. > > Checking mm/swapfile.c, I see s->max being set only in swapon(). Is this a typo > or am I misunderstanding this sentence ? It is updated by the file system methods or the generic implementation called by setup_swap_extents currently. So the above is a bit imprecise. The next patch then removes this confusing update. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel