Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp121772imn; Wed, 27 Jul 2022 01:17:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tYAqKVIo6C+z9IvbaHgduov3PUTSikOhPGDYQBSJJwOqcTWgDgO0zgOG9GnFypskVM3Sa5 X-Received: by 2002:a05:6402:278d:b0:43b:fc0d:9ec1 with SMTP id b13-20020a056402278d00b0043bfc0d9ec1mr14382608ede.319.1658909874940; Wed, 27 Jul 2022 01:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658909874; cv=none; d=google.com; s=arc-20160816; b=SZUIRqAHXiUHFOie0dejqQXXznP59hRxeoxZ9gOrFTsOsXNOB/4SG2AbsymXEMvbmr rOz5b3RiFqUTZTebEBvbd3NuF+/Rd+oBy/y73VnXh6F8TukXKAEqfx8ZgX9Sb6f/JY33 8lIv5WaTwmbowKrTk7sHgWe02rjCx5OF1CJ1/S6roZoWNaviqUjuilSa6+/oEnXYCBkM +Zd8hPNUbNWIfS0gYaRJz8OG3dYMNaGY9ZhAABOSxa9LBFchqiL0lasQR/yamFMdYXo2 k6bFQ3/x8kayDrKQ24eKlzyX5/T/diCMVtqUVmT9Ji9LhKOlAe1m9IsoBsK4nsKixKjd NBRw== 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:dkim-signature; bh=JkXNBVQ34XbPCOUb4W4Vewblc1+/qdZAow6n6y3UxjU=; b=JJbHERk41clbPP4ydfR1Uv+KmQW+7Cr+vrBRnuuSj5AaeWpdS7HDaqRVuo9ifjUGCg PyNW0y1+RGnf5GuGbz2kBcWD0LnsBd+BHmuOWnjx0JwavsIbeHf4QjmwfOxURO2mWHcV p8fPc51c6riK1A0YUkWlLnOD0l65nSst3TfVHVlIDgXhBnyqi6zpbmGsQ56PSHYaUBdu zlRCMEBNPMNOR8Ie+g3/4js/qubT8PalWJCW5jX9fnLRINyVfPlWueF1WRZByF01Z/FL 6K74aL4w0HpNKHZgIotqImo9R7DAjSRwOoPd7xvdX/Sli4NPrGJOIUTs59PhFnJjNHJL WhRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=DIbn3Gug; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a1709064fcc00b00711fd60fa17si14684752ejw.34.2022.07.27.01.17.30; Wed, 27 Jul 2022 01:17:54 -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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=DIbn3Gug; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229927AbiG0Hov (ORCPT + 99 others); Wed, 27 Jul 2022 03:44:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbiG0Hot (ORCPT ); Wed, 27 Jul 2022 03:44:49 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E481239BAA for ; Wed, 27 Jul 2022 00:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1658907889; x=1690443889; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=JkXNBVQ34XbPCOUb4W4Vewblc1+/qdZAow6n6y3UxjU=; b=DIbn3Gug80u/JrGDaiY9VkYrT6D0enIGB8oefJ1nWz24yBbpDkXj9xG9 2TF5ULJ3ZR/eHaIN8AiVydg4IwUQclZRTwNP1whPwQGyD++UbVhkOVjGY WZruPZqebaFbqU5dDwcnK6PE3WpDUWeOmbKE7aT9aHPUvPSkfD3l9jphR s=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 27 Jul 2022 00:44:49 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 00:44:48 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 27 Jul 2022 00:44:48 -0700 Received: from [10.232.65.248] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 27 Jul 2022 00:44:45 -0700 Message-ID: Date: Wed, 27 Jul 2022 15:44:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH] mm/page_owner.c: allow page_owner with given start_pfn/count Content-Language: en-US To: "Vlastimil Babka (SUSE)" , Matthew Wilcox CC: , , , , , References: <20220722150810.27740-1-quic_yingangl@quicinc.com> From: Kassey Li In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 7/26/2022 10:03 PM, Vlastimil Babka (SUSE) wrote: > On 7/25/22 10:39, Kassey Li wrote: >> hi, Matthew: >>     sorry for the delay, I just started to learn how to upstream patch, and >> setup my Thunderbird with plain text only. >>     you are right, two users will cause problem here. >>     the uses case is dump CMA area to understand the page usage in a given >> cma pool. 2nd, dump whole memory page owner is very time cost, mostly our >> android device has 8G memory now. >>     I will research and check again, if you have more idea on this , please >> kindly to share. > > You could try employing lseek() to specify the start pfn, and as for end > pfn, the process can just stop reading and close when it has seen enough? lseek is a good idea. read_page_owner start with below pfn = min_low_pfn + *ppos; so we need to export the min_low_pfn to user then decide the ppos to seek. (my_cma.base_pfn - min_low_pfn) is the ppos we want to set. is there concern to export min_low_pfn ? or use a mutex lock for my previous debugfs version patch ? > >> BR >> Kassey >> >> On 7/22/2022 11:38 PM, Matthew Wilcox wrote: >>> On Fri, Jul 22, 2022 at 11:08:10PM +0800, Kassey Li wrote: >>>> by default, page_owner iterates all page from min_low_pfn to >>>> max_pfn, this cost too much time if we want an alternative pfn range. >>>> >>>> with this patch it allows user to set pfn range to dump the page_onwer. >>> >>> This is a really bad UI.  If two users try to do different ranges at the >>> same time, it'll go wrong.  What use cases are you actually trying to >>> solve? >> >