From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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 E59E9391E7A for ; Tue, 30 Jun 2026 16:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782837293; cv=none; b=ITyfLSIIDZ+0Zk8qljKlM34sxYgCD3xQLn2lbCJXBfyL+5J0mLuQCvDJe69evraTJTPbZwszkGolSBRev4VqZZ2/d8enD1JspY73fwhN523gwgDTTWS8Qx8umXOdwAYBJl88JSCcyqEvcRE3VVCzBJO6Ao/r5s/nxZvwoND1SHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782837293; c=relaxed/simple; bh=An8LAuAebhAilZhop/a0/z/TNrwidNc5UkozEG2D6Yc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=b97XWr0WjqgqpvI1IAw9QFO1o0B7+9tUHHdfNM2Mbvl+WS3O+LDxyaLjIHafRYSTamKyaBww+F/MRQv48L6K3HcNOQtdy/b6hP8o0AxZ9z1hr/dQajo4KFKvvl/8H3XBrcgxKg2LgD0U9rqpowUczCt3hyEKoXprEpahsBogovs= 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 header.i=@cmpxchg.org header.b=khLiWr43; arc=none smtp.client-ip=209.85.222.178 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="khLiWr43" Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-92e67555e24so78540385a.3 for ; Tue, 30 Jun 2026 09:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1782837290; x=1783442090; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=F3vzLp53JrizIZ8vRPTNfFVJq97fTRHFgjl0sdoikIw=; b=khLiWr43a99ZzKZSus27qjuZh+h7yDjTgeMAs4VNvOi+tbZnYQuEgNp8rY9hPdvyYH K1URXys8Xpkg8DcPnXZ6DUANLvwxP1XZZUbj0vUkWcBMVeKnLwFpz2Z/RAKF+QBqRcmS bgY5AKPRRUZwcnSW2vqylqdroshZcsbCU5YnE6IM1nIcArRimpC+d+XEcE34ptnw6xD9 TRV+aFWewuxykwLJvJ0NZmoBMKWG5rMnzEKE3A7C/KwY7u4m9x6XSV4aWU7fNtq9JsHr rp3Ht7ThAeapoKQXKU3JLADmS59pWrJo31moZVx1GBqPAPElnTO3UJlUfi37RPwmFi91 qZkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782837290; x=1783442090; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F3vzLp53JrizIZ8vRPTNfFVJq97fTRHFgjl0sdoikIw=; b=lf2UWjb8dhQlo0shxnP/w7fFeYWIuU5Tp53h38nKrlb4hQAweEjdr5CB3zjKbad5cs 9LuaIhwftb4QWuPJFgI4McINpIDMwmsArfAySS1eS39JfZ62iCiljZ0/DwIlcJWtM1hw ZVZM+kNk+FYfrpBuGqWU3KsYtVhvt70niMQ/v3UlxmAbxBlHrNTPbTq1elOWxBNKmHDz uKxLnXvBoQiDIFfI4vertxVZwelgKBdYYwjmVPn4hNrKc1e0i6ZD/5YpZzCUIPVdZKRz bRHEUWLbT77k7IKg92uLvNlB0q8/qg3rU4odKtGZfjkFFTMstha7I3+FpjuAI1AN+occ 7ZJQ== X-Forwarded-Encrypted: i=1; AFNElJ9eK7inMSwpXRsaBZtyMi2tZNMaGRwkTOa0mrWkdCeNkYp7YDqRR2Vozyd94i4naU64UBUGvsWG8Bfn2vo=@vger.kernel.org X-Gm-Message-State: AOJu0YweXYRyfL6nqW4pabUt7ojzf+IM2fTJkQZQsQFBp/zrnVOCZpMg jfuCSJjfedPpXHQXts3hrJL7MiEJeAWbHhoQhwoWH9p+FvcQlytn48Z5kFXqYkhykMA= X-Gm-Gg: AfdE7cke80Kjs6tIPnqInmaKNCyTSaRs2YVftnOPUEvW5VbyAMZGM4j1PMMDLv8th5S XO1DvhZIBOYz40mYS3E5dKdfdV6SvtCgrpaPkpQN0V75tjeY9ebja2Iddx97G5/eYWbTQKYBPuk sukxeS9cNL5fhVulErKkKDzna4CgygOmXGRMXFcIEe6DcdVoEK7XiAMX+nVH+MykWkOWvXsy+oU TNdK5K4DqixwVlRo0d1QazFMSTsOaprVcpP+KUgHMxTf8EblK/8KHrDyXBG2e6iiyAt0ag3oqeG NwT+qhfSbgUMn6m8gWPpQckiS3wV4G1kkzEv1AaLSin6uyVdahAaDE5GDJof0pwW12KbtOeGgDI BK081AKzhuUWrTFRH6cZmcHCHzXdUx5vXfdqkXOv6Ub2JlTU+ybEVkA3lxvcM8RCmqP/ylaDiKq Xwlpc7dvGCdlQ= X-Received: by 2002:a05:620a:2b9b:b0:925:4655:a89b with SMTP id af79cd13be357-92e625f7147mr682887885a.27.1782837289779; Tue, 30 Jun 2026 09:34:49 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id af79cd13be357-92e6213bc41sm273914985a.6.2026.06.30.09.34.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2026 09:34:49 -0700 (PDT) Date: Tue, 30 Jun 2026 12:34:48 -0400 From: Johannes Weiner To: Jianyue Wu Cc: Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Barry Song , Youngjun Park , Qi Zheng , Shakeel Butt , Axel Rasmussen , Yuanchu Xie , Wei Xu , David Hildenbrand , Michal Hocko , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Hugh Dickins , Baolin Wang , Jonathan Corbet , Shuah Khan , Baoquan He , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v6 1/3] mm/swap: colocate page-cluster sysctl with swap readahead Message-ID: References: <20260701-ch-swap-series-plus-folio-lru-cleanup-v6-0-d4f648963382@gmail.com> <20260701-ch-swap-series-plus-folio-lru-cleanup-v6-1-d4f648963382@gmail.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260701-ch-swap-series-plus-folio-lru-cleanup-v6-1-d4f648963382@gmail.com> On Wed, Jul 01, 2026 at 12:27:32AM +0800, Jianyue Wu wrote: > page_cluster and the vm.page-cluster sysctl are only used by swap-in > readahead in swap_state.c. Move them out of swap.c together with > swap_readahead_setup(), and make page_cluster static to that file. > > Rename swap_setup() while moving it as well. The helper is internal to > MM and now only sets up swap readahead defaults and its sysctl hook, so > the more specific name matches its reduced scope. > > swap_setup() previously lived in mm/swap.c, which is built > unconditionally, so the vm.page-cluster sysctl was registered also on > CONFIG_SWAP=n kernels. swap_readahead_setup() is now a no-op stub when > CONFIG_SWAP is disabled, so vm.page-cluster is no longer registered > there. The knob only tunes swap-in readahead and had no effect without > swap. > > Suggested-by: Baoquan He > Suggested-by: Barry Song > Acked-by: David Hildenbrand (Arm) > Signed-off-by: Jianyue Wu Acked-by: Johannes Weiner Btw, I suggested this: https://lore.kernel.org/all/adUTC-7iyOAUlhR7@cmpxchg.org/