Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9346358rwp; Thu, 20 Jul 2023 03:39:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlH1cX5FUT2fjcLM2eTAi5idhgAxfX3zuk2SQAOZIrMYDCkWhSZo8h3GZ20g4KAxZ5NCyUAP X-Received: by 2002:a17:907:a0d3:b0:994:54af:e27d with SMTP id hw19-20020a170907a0d300b0099454afe27dmr4033700ejc.29.1689849548302; Thu, 20 Jul 2023 03:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689849548; cv=none; d=google.com; s=arc-20160816; b=eB9SNpZhmh8UZKTf/rB71MuGXmmEkwBJPQZTzgjDu4MFiXsYLxcRiPvcQ2w7uVa4d2 2sd+SbQ94pKc8IP0qVSRQHRZka9W9KhBL5pNFrlcJjCXe9bI4qF/Fet7eBK9elN6nEUt srU8xAN/O9GHItGIGnFmdHN8YeJAe1ibxLf7DqmB+alzg63t/tQNSVCR5LjUPn+LmgUW MSl93sAH4P0yNNgHYRQppy63pTXiOWYRDPAAru/ZuPFaP15eiwttsG0TzVkNPaD1eP5D MeLVCkoNEblqzO09jgUhn7n79e6Erkqq3NhW6j2Ts9WHVdunPUc8t2W4CHsWXWHYsei8 /BrQ== 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 :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id; bh=QRDvdc8e1iZo3Qo3P8Xns/x2iSwX0zvxaWcd1w9CJ9E=; fh=wxBE3Du0gAtDNiKvpPKyu/V83KNGVPi6FC27rMuFpak=; b=izxDd2YngkQUS0CT8/U8yDghgTtoPluBj+0dGxIKPt271Qo8wXj5A+XkN/NrHIu6LL 6dn68tofgVAjIAX2/gvo4moUY5ksUrt/6+dJumn/E9OBB8ZcLIhr6xxY9NjiSP04MsYI CzidVRu9H50ik17/dtdV6xEavO9Tjdgx2NcGqy4HqgNEyqr/QxvRIPE+IgssAn6s/REx wIIQiYcue0Y7CGKGw7jvie46Rh6O4e1Xz5Yj+iBPk0FKkfQDsYmJq25mZkDI+2WfrdTZ HKRvSGaqEj+tuNH9F6WT3ZcA0Yc9eqwkspBBlsEtQnXY5f0STLO785iRntQF3jtVNVyu JRoQ== 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 a7-20020a170906670700b009886470de61si475847ejp.857.2023.07.20.03.38.44; Thu, 20 Jul 2023 03:39:08 -0700 (PDT) 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 S230322AbjGTJwh (ORCPT + 99 others); Thu, 20 Jul 2023 05:52:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbjGTJwT (ORCPT ); Thu, 20 Jul 2023 05:52:19 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BD4B4213 for ; Thu, 20 Jul 2023 02:50:56 -0700 (PDT) Received: from kwepemm600020.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R66r90jwJz18LQR; Thu, 20 Jul 2023 17:31:05 +0800 (CST) Received: from [10.174.179.160] (10.174.179.160) by kwepemm600020.china.huawei.com (7.193.23.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 20 Jul 2023 17:31:49 +0800 Message-ID: Date: Thu, 20 Jul 2023 17:31:48 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 From: "zhangpeng (AS)" Subject: Re: [PATCH v2 8/9] mm/page_io: convert count_swpout_vm_event() to take in a folio To: Matthew Wilcox CC: , , , , , References: <20230719095848.3422629-1-zhangpeng362@huawei.com> <20230719095848.3422629-9-zhangpeng362@huawei.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.160] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600020.china.huawei.com (7.193.23.147) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 2023/7/19 22:24, Matthew Wilcox wrote: > On Wed, Jul 19, 2023 at 05:58:47PM +0800, Peng Zhang wrote: >> -static inline void count_swpout_vm_event(struct page *page) >> +static inline void count_swpout_vm_event(struct folio *folio) >> { >> #ifdef CONFIG_TRANSPARENT_HUGEPAGE >> - if (unlikely(PageTransHuge(page))) >> + if (unlikely(folio_test_pmd_mappable(folio))) >> count_vm_event(THP_SWPOUT); >> #endif > As I said in my earlier response, you don't need the ifdefs. Check > the definition of folio_test_pmd_mappable. Sorry I forgot to delete the ifdefs. I'll fix it in a v3. Thanks. -- Best Regards, Peng