From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) (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 7AD073F4112 for ; Thu, 14 May 2026 02:41:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778726519; cv=none; b=ohjLYWeDOQTkAO0lEwucieF8uM5H0ZtLtu4zh7uXt0pK4t8CbaxRAx8OmNAZjuHr0jBtLRyN7tYfY9iNAz4W6/c9r/Ei9ymnfdLl7Dwdk4b0AIm+ulMyycQaPxRKgGiz9Os8Eu4FvKvQpvVuHQTzJgT38zSaUKhYdsuq/oyE8Xg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778726519; c=relaxed/simple; bh=1A89HWliteeHf32qQKL3o6aU+o9ztiuOvB2qn+rl42w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iSBls+a5j01D+CVx3uq9/Rsl7JHjrZ7UdVnCfQiyGB9pyvE+HGBoARaETQwiCOzUtCsnywTSDF1YBWgB3N+ckzoW8X3HktUo1IiLvQsPPxVfPelOyRypKoHAC+NqcO3RPhYogBRwlDI50D1jvs9akm3wQnWdIV35LX+woxA7HFA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=Du+NkhSS; arc=none smtp.client-ip=115.124.30.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="Du+NkhSS" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1778726507; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=eGC7yF9jJ9cR6pPF1OoIK1SpbTUjOBAjyG5g7YwpyDg=; b=Du+NkhSSSI8HdtxPHWlSVfN9D09T/zSfJ3PVj8e6gzBPRVj8eGgu2V6L+M1y+HFdUBQaRrOG0M18KANZD4+qLmwZJP9ZIXWxxxRn+poY8GGwu/wxQcN0yU4IZMQjTDDpywV29G4+l4Una6Yip/WaN4pcz3y4jTNK5Ii5fS5R17Q= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045098064;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0X2vOsEN_1778726505; Received: from 30.74.144.136(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0X2vOsEN_1778726505 cluster:ay36) by smtp.aliyun-inc.com; Thu, 14 May 2026 10:41:46 +0800 Message-ID: <48a7920b-e624-48c7-bee7-b87cf6ecb436@linux.alibaba.com> Date: Thu, 14 May 2026 10:41:45 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] mm: huge_memory: refactor thpsize_shmem_enabled_show() with helper arrays To: ranxiaokai627@163.com, hughd@google.com, akpm@linux-foundation.org Cc: leitao@debian.org, ljs@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ran.xiaokai@zte.com.cn References: <20260513094508.50888-1-ranxiaokai627@163.com> <20260513094508.50888-2-ranxiaokai627@163.com> From: Baolin Wang In-Reply-To: <20260513094508.50888-2-ranxiaokai627@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject line should be: 'mm: shmem: xxx' On 5/13/26 5:45 PM, ranxiaokai627@163.com wrote: > From: Ran Xiaokai > > Replace the hardcoded if/else chain of test_bit() calls and string > literals in thpsize_shmem_enabled_show() with a loop over > huge_shmem_orders_by_mode[] and huge_shmem_enabled_mode_strings[] arrays. > > This makes thpsize_shmem_enabled_show() consistent with > thpsize_shmem_enabled_store() and eliminates duplicated mode name strings. > > Signed-off-by: Ran Xiaokai > --- LGTM. Thanks. Reviewed-by: Baolin Wang Tested-by: Baolin Wang