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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAA1FC3DA7C for ; Fri, 30 Dec 2022 09:03:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234631AbiL3JDT (ORCPT ); Fri, 30 Dec 2022 04:03:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbiL3JDQ (ORCPT ); Fri, 30 Dec 2022 04:03:16 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6322A11832 for ; Fri, 30 Dec 2022 01:03:14 -0800 (PST) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Njzlb6VJdzRqHP; Fri, 30 Dec 2022 17:01:47 +0800 (CST) Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 30 Dec 2022 17:03:12 +0800 Message-ID: Date: Fri, 30 Dec 2022 17:03:11 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] mm: huge_memory: convert split_huge_pages_all() to use a folio Content-Language: en-US To: Matthew Wilcox CC: Andrew Morton , , References: <20221229122503.149083-1-wangkefeng.wang@huawei.com> From: Kefeng Wang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/12/30 16:14, Matthew Wilcox wrote: > On Thu, Dec 29, 2022 at 08:25:03PM +0800, Kefeng Wang wrote: >> - if (!PageHead(page) || PageHuge(page) || !PageLRU(page)) >> + if (!folio_test_large(folio) >> + || folio_test_hugetlb(folio) >> + || !folio_test_lru(folio)) >> goto next; > > That is a completely illegible way of indenting this code! There's > no visual cue when the condition stops and when the next statement > begins. Try one of these: > sorry about the bad indenting, > if (!folio_test_large(folio) || > folio_test_hugetlb(folio) || > !folio_test_lru(folio)) > goto next; > will resend with this one, thanks for your review.