Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6974682rwl; Fri, 30 Dec 2022 01:17:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXtkNAzUxswnafi+hbkyFeThIhGBqrveNvEWK4ZqgbQfVvJVx2U/icUvtxoyWlv32y+iHWPZ X-Received: by 2002:a05:6a21:394a:b0:a7:345a:103a with SMTP id ac10-20020a056a21394a00b000a7345a103amr38628735pzc.44.1672391838195; Fri, 30 Dec 2022 01:17:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672391838; cv=none; d=google.com; s=arc-20160816; b=Nen9LZM3fVElSjJk48PuhMB918W8CEUEfnSHO5bIIZRcIpdDGD0WY9Kdm+VCw994Ik xMoXceGg6NPQiTSytjvtBgH/bXsipKIjk8Y+sAprSg4YmOoq/FJ/To28PPHnFLTukhm4 g4t1X96no7L1kToC+WlHsRA5hI9vLt+ZylyBZjO5FYEnREbQQJ8+ZiRvVohruBxLa8bb fdUoSWaXAhu3tRX8YzEYDKu/zH5ismup0UdJvEn90ds19H9uctb7r3W9lfXUmQrt6Ok0 2QUSErcm2/d6X8Yq77PsJ4DNy8a6Owshjdkos4Iw5HKsPZ2Nbh4Tf3Dj7BNEn+e6MfZX NAPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=je3TOIYFickhpMMZRsySSEMYQVOZaaCmN17UdzQLo38=; b=hmrvhqjx4/XqduHtjAgB7DMZUZxaUwivMqidPS+sul59Kq6P0ClmF/jA82VK0kfDES 9g5qhwljZYVPVyN8vkD/mdU5XkaEASBPHXudCvlKu4LVI8yYHnF6JHVhQD2M2AZYSxBX +zC4frW+hMWWMnzI0gYvj5z5a74RJ2skwvNiqVJy4wO4ZvGkokLJ6SQRJhzO0QaK/k16 Kctmj10Dy++Z6aQ+naca2SjWk39ssdOmTceGtiyg8bIodqE5KhMAmCr6jiI3iqjXsTdM M0t/jq4Gar5dMPZcQGvbGKDhBhqtsvL19KK6SdAABmhG5IoneejK2ppE5NXkIszRLd3c 5auw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a170902ab9400b0019143677fd3si19629590plr.461.2022.12.30.01.17.09; Fri, 30 Dec 2022 01:17:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234573AbiL3JDS (ORCPT + 64 others); Fri, 30 Dec 2022 04:03:18 -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 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.