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 C8CC3C19F2B for ; Thu, 28 Jul 2022 05:09:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E10CF6B0072; Thu, 28 Jul 2022 01:09:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC0266B0073; Thu, 28 Jul 2022 01:09:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C89168E0001; Thu, 28 Jul 2022 01:09:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id BAF476B0072 for ; Thu, 28 Jul 2022 01:09:50 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 773661C6890 for ; Thu, 28 Jul 2022 05:09:50 +0000 (UTC) X-FDA: 79735331340.05.B423129 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf23.hostedemail.com (Postfix) with ESMTP id 9CBA11400B2 for ; Thu, 28 Jul 2022 05:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658984989; x=1690520989; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Gr4h4VLtM4whcOpJylcO3fdPCwh12PNAfOKGe+1rMK8=; b=EAKc638WugnfE3rfWp0UsLXVhZo7Fs0eCHXS9iZFSYkp2SH7a8yomS1e n/3BJv6iJgqXIllE4v/7nhxZ8U5N6Wepc2872g77/Sr+ROgdZq7/CDIlJ jbZoX2sftV8tsYEENhP7GNeCASFKvdt4rnFvbYk4sw+TGXLqKkR8JxG0y OWtsXSrgY5/z6CNpWR1qMl9VY0X2LtUQH5/NRkkHNNv7IAZlN74rwGmnC cifpheFMmMwDyMKLHXlN+yrnYi8BHY10GgcrbcKMzc8U6u6CUJfFfVJxf KnHtQKG/QIdOLOhkkuJaeKMHF1TurSkRtXFgk3tAgOuZH570HZm0mtlt2 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="289191559" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="289191559" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 22:09:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="551138662" Received: from lkp-server01.sh.intel.com (HELO e0eace57cfef) ([10.239.97.150]) by orsmga003.jf.intel.com with ESMTP; 27 Jul 2022 22:09:44 -0700 Received: from kbuild by e0eace57cfef with local (Exim 4.96) (envelope-from ) id 1oGvmK-0009hq-0h; Thu, 28 Jul 2022 05:09:44 +0000 Date: Thu, 28 Jul 2022 13:09:32 +0800 From: kernel test robot To: Liu Zixian , hughd@google.com, akpm@linux-foundation.org, linux-mm@kvack.org Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linfeilong@huawei.com, liuzixian4@huawei.com, willy@infradead.org Subject: Re: [PATCH v2] shmem: support huge_fault to avoid pmd split Message-ID: <202207281337.AGofErxA-lkp@intel.com> References: <20220726132751.1639-1-liuzixian4@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220726132751.1639-1-liuzixian4@huawei.com> ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=EAKc638W; spf=pass (imf23.hostedemail.com: domain of lkp@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658984990; a=rsa-sha256; cv=none; b=x2ij/cycwZ9/gSzjWv0MbCSDILnierAgsVb1rV9uzAQgW5JDC4gHpKVO1sm3PnZHdoFTE2 u0nsYPZWgPMt+Q5rxetcH2BV5iK0enZNSapeWrx7k1sInkaYLgZ1m1LsovZ4GYRxdkxkrm 2I/XFAKGnsEpPNgYg9z0+UfEPVU6bv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658984990; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BBrgkgyZpGB/ieoo9dGn1WLrcSvtis8UMWEL1K17hzg=; b=DMMh2KMoXHwvZI3KzrH35LH2XM8C6YB6WwyNnKf0fDrb+J6ZO97wVrsAtq0ykE3F3Iw7Yn NhhnSaE6yoZVj1CclP32RroLri7ZnmWBvX6Oy1HCVjEzfyQr9GtZPQnQrosJ+O6D0mn81E qnqDdml1phN4i3TR2dy+oKRkckQPo0Y= X-Stat-Signature: bpgdr4fm6qey7xjgr654x4hp333kkq4o X-Rspamd-Queue-Id: 9CBA11400B2 X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=EAKc638W; spf=pass (imf23.hostedemail.com: domain of lkp@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspamd-Server: rspam02 X-HE-Tag: 1658984989-585615 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: Hi Liu, Thank you for the patch! Yet something to improve: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on linus/master v5.19-rc8 next-20220727] [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/Liu-Zixian/shmem-support-huge_fault-to-avoid-pmd-split/20220726-212946 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220728/202207281337.AGofErxA-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8dfaecc4c24494337933aff9d9166486ca0949f1) 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/40060ce82c97d38c8e2d71f9d0e4ee818596bb14 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Liu-Zixian/shmem-support-huge_fault-to-avoid-pmd-split/20220726-212946 git checkout 40060ce82c97d38c8e2d71f9d0e4ee818596bb14 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> mm/shmem.c:2136:39: error: call to __compiletime_assert_272 declared with 'error' attribute: BUILD_BUG failed unsigned long haddr = vmf->address & HPAGE_PMD_MASK; ^ include/linux/huge_mm.h:307:27: note: expanded from macro 'HPAGE_PMD_MASK' #define HPAGE_PMD_MASK ({ BUILD_BUG(); 0; }) ^ include/linux/build_bug.h:59:21: note: expanded from macro 'BUILD_BUG' #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:333:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ :41:1: note: expanded from here __compiletime_assert_272 ^ 1 error generated. vim +/error +2136 mm/shmem.c 2132 2133 static vm_fault_t shmem_huge_fault(struct vm_fault *vmf, enum page_entry_size pe_size) 2134 { 2135 vm_fault_t ret = VM_FAULT_FALLBACK; > 2136 unsigned long haddr = vmf->address & HPAGE_PMD_MASK; 2137 struct page *old_page, *new_page; 2138 int gfp_flags = GFP_HIGHUSER_MOVABLE | __GFP_COMP; 2139 2140 /* read or shared fault will not split huge pmd */ 2141 if (!(vmf->flags & FAULT_FLAG_WRITE) 2142 || (vmf->vma->vm_flags & VM_SHARED)) 2143 return VM_FAULT_FALLBACK; 2144 if (pe_size != PE_SIZE_PMD) 2145 return VM_FAULT_FALLBACK; 2146 2147 if (pmd_none(*vmf->pmd)) { 2148 if (shmem_fault(vmf) & VM_FAULT_ERROR) 2149 goto out; 2150 if (!PageTransHuge(vmf->page)) 2151 goto out; 2152 old_page = vmf->page; 2153 } else { 2154 old_page = pmd_page(*vmf->pmd); 2155 page_remove_rmap(old_page, vmf->vma, true); 2156 pmdp_huge_clear_flush(vmf->vma, haddr, vmf->pmd); 2157 add_mm_counter(vmf->vma->vm_mm, MM_SHMEMPAGES, -HPAGE_PMD_NR); 2158 } 2159 2160 new_page = &vma_alloc_folio(gfp_flags, HPAGE_PMD_ORDER, 2161 vmf->vma, haddr, true)->page; 2162 if (!new_page) 2163 goto out; 2164 copy_user_huge_page(new_page, old_page, haddr, vmf->vma, HPAGE_PMD_NR); 2165 __SetPageUptodate(new_page); 2166 2167 ret = do_set_pmd(vmf, new_page); 2168 2169 out: 2170 if (vmf->page) { 2171 unlock_page(vmf->page); 2172 put_page(vmf->page); 2173 } 2174 return ret; 2175 } 2176 -- 0-DAY CI Kernel Test Service https://01.org/lkp