From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3E67D3C1976 for ; Thu, 14 May 2026 12:05:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778760345; cv=none; b=dFgKKtFmhi32oeV0k0aYanq2Mod/10l3yCVR+V1KXZF1Q3YDvMq5h1xnLbeoQ6+sPFFUGlyP/CQERbxDWfFIdHPOo7k60YEvsgW9JKXVmS2nM+LYxFpAG7BHZc7WpK+JtFMSW8949S6BucXE9smbaaIaOQchw40ehdPR4L1dCwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778760345; c=relaxed/simple; bh=u2IRkJIdNc5n6d1Pp3C/BA15PO/LGXnhPRWXps/pwmg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M6lmeKA50leNg8r2Pp0LPUJ6fJMf6JdzpwQWdAFxY7xeG8CHaV0qtDUDtrRzzBrQvrnupoVYyKLCf/VIt8WKh00AtGoVzIfV+NGmNrl3u00LkPuClRZrVMvknbafB+o99DbcId/jorcyn/lQiiYpZbLdvGOtDlD6gVBTBEswkVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nxRKoaYK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nxRKoaYK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D93FEC2BCB3; Thu, 14 May 2026 12:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778760344; bh=u2IRkJIdNc5n6d1Pp3C/BA15PO/LGXnhPRWXps/pwmg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nxRKoaYK4eb8EtfLemF99sX0W8F5Q5Zzhv/xs248Gkb8uEn22lQx0XrcKWLsXbKap sxuBn6xhynodZu7VmgdMjdJVRbUghMc0ukfWQQhBWC+BJE9PH+jehjk5NwXHsKiEP6 EMJjXTkOU/Rci04u2vDXErI0Y+0VZG5+560G46UOBjWxw4OvpDXcsT2vgW7ZVj81J/ RJpAAHIp9PXHkZKZIzc5mxA5czKorSNi+fHoTwo4tHna34FARqTFbtzELsOGDpRnyu GK5T4yebECPudPjUl3NBWV806tOuUkRXFEtLsejxHx/nKKV6tH17CS6ZNFDDnmQgjc XKT53bC9lAhmQ== Date: Thu, 14 May 2026 13:05:40 +0100 From: Lorenzo Stoakes To: ranxiaokai627@163.com Cc: Baolin Wang , hughd@google.com, akpm@linux-foundation.org, leitao@debian.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ran.xiaokai@zte.com.cn Subject: Re: [PATCH v2 1/2] mm: huge_memory: refactor thpsize_shmem_enabled_store() with sysfs_match_string() Message-ID: References: <20260513094508.50888-1-ranxiaokai627@163.com> <6d6b1949-fb11-4b05-a01a-9427019b3ae0@linux.alibaba.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: <6d6b1949-fb11-4b05-a01a-9427019b3ae0@linux.alibaba.com> On Thu, May 14, 2026 at 10:36:34AM +0800, Baolin Wang wrote: > The subject line should be: "mm: shmem: xxx" > > On 5/13/26 5:45 PM, ranxiaokai627@163.com wrote: > > From: Ran Xiaokai > > > > Inspired by commit 82d9ff648c6c ("mm: huge_memory: refactor > > anon_enabled_store() with set_anon_enabled_mode()"), refactor > > thpsize_shmem_enabled_store() using sysfs_match_string(). > > This eliminates the duplicated spin_lock/unlock(), set/clear_bit(), > > calls across all branches, reducing code duplication. > > > > Tested with selftests ./run_kselftest.sh -t mm:ksft_thp.sh, > > all test cases passed. > > > > Signed-off-by: Ran Xiaokai > > --- > > You should document your changes under the '---' for the new version, or > ideally, include a cover letter describing them. Well this should have been a cover letter anyway! :) Ran - please don't send series with >1 patch with 2/2 in-reply-to 1/2, it's a pain to deal with. Send a cover letter if >1 patch and have both in-reply-to the cover letter. Cheers, Lorenzo