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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 136DAC4332F for ; Tue, 13 Dec 2022 11:36:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A1A7B8E0003; Tue, 13 Dec 2022 06:36:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CA3E8E0002; Tue, 13 Dec 2022 06:36:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B9228E0003; Tue, 13 Dec 2022 06:36:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7C76C8E0002 for ; Tue, 13 Dec 2022 06:36:14 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 335D6160D09 for ; Tue, 13 Dec 2022 11:36:14 +0000 (UTC) X-FDA: 80237079468.09.0DF2498 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf11.hostedemail.com (Postfix) with ESMTP id 981C740014 for ; Tue, 13 Dec 2022 11:36:11 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670931372; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+M8LjXeKSpH3WKgUzhCbjNcTd0HEBY5fWvcIRLxX2Hc=; b=ISbXEzjN67Z/HqpkDUI6jKH8hSOIJeguAG2PO/Enz7uDlyEIlCcEYed3FGj1j0SyRuINup YEEHQZeun8J+fYYZXFHZWV4vB6gNQ24A5KekkSMtMcXERZ/hFxwNXO/u0PsBaBc/FUCcPa ULrExfi9WSmfqrbofBxy4dDUvRYXsyE= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670931372; a=rsa-sha256; cv=none; b=VNdh0xCKZe6SFgtxMpWDjD/yCqis6V+6DELEAtBm/t+Fjyv7X04vCKppg0rTPmh3IQhnVg a85I0A5jbbYFAzN7Bw22CMPbze3lLMiEHu0O4iZPflcEN3zeTUTu7zUDRUIkZ/KCZqysei JM7voC7iJHcU6jvOBLwi6CcYFuIz7rc= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NWbyK4zW9zRpqd; Tue, 13 Dec 2022 19:35:05 +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; Tue, 13 Dec 2022 19:36:04 +0800 Message-ID: <3312eb55-6ce5-67e3-389f-4937002423cd@huawei.com> Date: Tue, 13 Dec 2022 19:36:04 +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 -next 1/8] mm: memory_hotplug: add pfn_to_online_folio() Content-Language: en-US To: kernel test robot , Andrew Morton , David Hildenbrand , Oscar Salvador , SeongJae Park CC: , Linux Memory Management List , , , , References: <20221213092735.187924-2-wangkefeng.wang@huawei.com> <202212131842.5xNHRahj-lkp@intel.com> From: Kefeng Wang In-Reply-To: <202212131842.5xNHRahj-lkp@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 981C740014 X-Stat-Signature: 7bzr9uunwduj3sm6qh4bg6p6m3e11hhm X-HE-Tag: 1670931371-49795 X-HE-Meta: U2FsdGVkX1/XOaj7E2hPh9WKMAw2DjVu0ZmIz4H9T4s+En+L0ZfvlLcGpLT3ENDa+I5OyiqMiGD2Q/+QHOwaJazpSLjR/RI6J7aouwtEmMVFVL/XRGlhPdg2jPKfv++/XqGH8t80Fs5pxu3d6XuebKYrQCON+M1BpFfP0Zz2VxU9z0pCH+UaFWovf3fSE1yiTCcHqa0MGEdH6r2Q000bysLY7tXmG8qCQtF2UjLswLyIMI4NP89eWVKzY32GCKcKzJqXmLM8o7UJYVs1ZSFAT6kBk536uXV+sCoo+tZuhmKOaR6BNr4uJMFzwY21L9myv3brLFxBJL1iTjP7f+DrG1/2BZfPV9w7s4MDfVx6OuSaur628xoqP3htlJPl6qhCWak0KVaZWo0WfZgOaj0E5AvkOywmfrqpaxMzKfkh1hFPenyep3CkW6TxFhXvOH+aUVwPQdMwhhOdc4KIsLNDmHltowBL2xGZoLDXKx0nMtKX/mVRcPsSqahY6YeyNhYY7UzOkQfeiwGcoQ4aQS6VYee1fIOArTL3jwO7Hq0O0+FAWxSCUIuqTzkB2jOaGh6G0mZc/9gK1IP7ASLV37KJVubiYE/Wo6SGlx7cPSuzWvzM9jkp3WVBHtA+JHBksWYCWQPh28WZm4XDWK1C1KtCSOB9fJ8mQF3X/gJW5xXIRXFQ9XkATG5G2+uZbS9mp1UG41MxPvGX0AzbjCBhUzlkHz9bc/s7bf8vEaN0hOW2C7SkSxzLDAYjjtQOcaAdLUpjAieAvsgdtVHnJXifRRt+9wtH3TUNVqwtUcC+ErxIHhA7FRIkDrJgrZ3RCSAgWoSXCXVXM9SG+vvS37G3D8w5R0ZsC7dDsxq9XnBxCCTrl4gD6cgJNMAv6Vd7vIxkV1SfFWDTE/2Qyqvlxb2mxaJm/IXJ2IyaziSFzR8WtVjL0R9ze6IoNxUUwLdMs+yTx7Fr X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022/12/13 19:13, kernel test robot wrote: > Hi Kefeng, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v6.1] > [cannot apply to akpm-mm/mm-everything next-20221213] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Kefeng-Wang/mm-converted-page-idle-and-damon-to-use-folios/20221213-171230 > patch link: https://lore.kernel.org/r/20221213092735.187924-2-wangkefeng.wang%40huawei.com > patch subject: [PATCH -next 1/8] mm: memory_hotplug: add pfn_to_online_folio() > config: alpha-allyesconfig > compiler: alpha-linux-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/6549c7ce5345695320d1dadef2aceff6e76d34f4 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Kefeng-Wang/mm-converted-page-idle-and-damon-to-use-folios/20221213-171230 > git checkout 6549c7ce5345695320d1dadef2aceff6e76d34f4 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha prepare > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot > > All error/warnings (new ones prefixed by >>): > > In file included from include/linux/mmzone.h:1245, > from include/linux/gfp.h:7, > from include/linux/percpu_counter.h:16, > from include/linux/sched/user.h:7, > from include/linux/cred.h:17, > from include/linux/sched/signal.h:10, > from include/linux/ptrace.h:7, > from arch/alpha/kernel/asm-offsets.c:11: > include/linux/memory_hotplug.h: In function 'pfn_to_online_folio': >>> include/linux/memory_hotplug.h:230:13: error: implicit declaration of function 'pfn_valid'; did you mean 'gid_valid'? [-Werror=implicit-function-declaration] > 230 | if (pfn_valid(pfn)) \ > | ^~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ > In file included from arch/alpha/include/asm/page.h:94, > from include/linux/shm.h:6, > from include/linux/sched.h:16, > from arch/alpha/kernel/asm-offsets.c:10: >>> include/asm-generic/memory_model.h:41:37: error: implicit declaration of function '__pfn_to_section' [-Werror=implicit-function-declaration] > 41 | struct mem_section *__sec = __pfn_to_section(__pfn); \ > | ^~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page' > 53 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page' > 231 | ___page = pfn_to_page(pfn); \ > | ^~~~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ >>> include/asm-generic/memory_model.h:41:37: warning: initialization of 'struct mem_section *' from 'int' makes pointer from integer without a cast [-Wint-conversion] > 41 | struct mem_section *__sec = __pfn_to_section(__pfn); \ > | ^~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page' > 53 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page' > 231 | ___page = pfn_to_page(pfn); \ > | ^~~~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:41:37: note: (near initialization for 'page') > 41 | struct mem_section *__sec = __pfn_to_section(__pfn); \ > | ^~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page' > 53 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page' > 231 | ___page = pfn_to_page(pfn); \ > | ^~~~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ >>> include/asm-generic/memory_model.h:42:9: error: implicit declaration of function '__section_mem_map_addr' [-Werror=implicit-function-declaration] > 42 | __section_mem_map_addr(__sec) + __pfn; \ > | ^~~~~~~~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page' > 53 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page' > 231 | ___page = pfn_to_page(pfn); \ > | ^~~~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ >>> include/linux/memory_hotplug.h:231:25: warning: assignment to 'struct page *' from 'long unsigned int' makes pointer from integer without a cast [-Wint-conversion] > 231 | ___page = pfn_to_page(pfn); \ > | ^ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ > include/linux/mmzone.h: At top level: >>> include/linux/mmzone.h:1740:28: error: conflicting types for '__section_mem_map_addr'; have 'struct page *(struct mem_section *)' > 1740 | static inline struct page *__section_mem_map_addr(struct mem_section *section) > | ^~~~~~~~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:42:9: note: previous implicit declaration of '__section_mem_map_addr' with type 'int()' > 42 | __section_mem_map_addr(__sec) + __pfn; \ > | ^~~~~~~~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page' > 53 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page' > 231 | ___page = pfn_to_page(pfn); \ > | ^~~~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ >>> include/linux/mmzone.h:1801:35: error: conflicting types for '__pfn_to_section'; have 'struct mem_section *(long unsigned int)' > 1801 | static inline struct mem_section *__pfn_to_section(unsigned long pfn) > | ^~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:41:37: note: previous implicit declaration of '__pfn_to_section' with type 'int()' > 41 | struct mem_section *__sec = __pfn_to_section(__pfn); \ > | ^~~~~~~~~~~~~~~~ > include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page' > 53 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page' > 231 | ___page = pfn_to_page(pfn); \ > | ^~~~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ >>> include/linux/mmzone.h:1839:19: error: static declaration of 'pfn_valid' follows non-static declaration > 1839 | static inline int pfn_valid(unsigned long pfn) > | ^~~~~~~~~ > include/linux/memory_hotplug.h:230:13: note: previous implicit declaration of 'pfn_valid' with type 'int()' > 230 | if (pfn_valid(pfn)) \ > | ^~~~~~~~~ > include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page' > 270 | struct page *page = pfn_to_online_page(pfn); > | ^~~~~~~~~~~~~~~~~~ > arch/alpha/kernel/asm-offsets.c:15:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes] > 15 | void foo(void) > | ^~~ > cc1: some warnings being treated as errors > make[2]: *** [scripts/Makefile.build:118: arch/alpha/kernel/asm-offsets.s] Error 1 > make[2]: Target 'prepare' not remade because of errors. > make[1]: *** [Makefile:1272: prepare0] Error 2 > make[1]: Target 'prepare' not remade because of errors. > make: *** [Makefile:231: __sub-make] Error 2 > make: Target 'prepare' not remade because of errors. > > > vim +230 include/linux/memory_hotplug.h Thanks, it seems that we need use macro definition instead of inline function, will update in the next version. > > b4a0215e11dcfe Kefeng Wang 2022-08-27 225 > 208d54e5513c0c Dave Hansen 2005-10-29 226 #else /* ! CONFIG_MEMORY_HOTPLUG */ > 2d070eab2e8270 Michal Hocko 2017-07-06 227 #define pfn_to_online_page(pfn) \ > 2d070eab2e8270 Michal Hocko 2017-07-06 228 ({ \ > 2d070eab2e8270 Michal Hocko 2017-07-06 229 struct page *___page = NULL; \ > 2d070eab2e8270 Michal Hocko 2017-07-06 @230 if (pfn_valid(pfn)) \ > 2d070eab2e8270 Michal Hocko 2017-07-06 @231 ___page = pfn_to_page(pfn); \ > 2d070eab2e8270 Michal Hocko 2017-07-06 232 ___page; \ > 2d070eab2e8270 Michal Hocko 2017-07-06 233 }) > 2d070eab2e8270 Michal Hocko 2017-07-06 234 >