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 8CAE3C3DA6E for ; Wed, 3 Jan 2024 11:57:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F0EE86B037D; Wed, 3 Jan 2024 06:57:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E99A66B037E; Wed, 3 Jan 2024 06:57:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5F046B037F; Wed, 3 Jan 2024 06:57:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C181D6B037D for ; Wed, 3 Jan 2024 06:57:31 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 96B851407DC for ; Wed, 3 Jan 2024 11:57:31 +0000 (UTC) X-FDA: 81637849902.01.90A7E78 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by imf02.hostedemail.com (Postfix) with ESMTP id 029CB80006 for ; Wed, 3 Jan 2024 11:57:28 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=C+datJ8p; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf02.hostedemail.com: domain of lkp@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1704283049; 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=tt946DOZfzgwjKd+TsSey5+i4+/WwbzGb2BMHgKjYyU=; b=lzyS/2lg7jcN2Q9wsoITzJcqJUTYfYBt9fAI7RZW1Zt1LBc92rAL7jqPttibmkzzqfGdXw RBSLtXudXKXC7NLwUgIBESYVlARj6YEapOuo57C4bB6E/MkZiw4eR+/goT09imEQupc5Cr TMf8PriDvMDSlsOvpNwiuM10pn3Y3Fo= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=C+datJ8p; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf02.hostedemail.com: domain of lkp@intel.com designates 198.175.65.9 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704283049; a=rsa-sha256; cv=none; b=GES1/2+mmETqvUEanNEpd2b5FfhuzWsHrrFP9e1Gg7MQNyegJX0gHpL5FBn4aiQOopOYw9 iNLvJv45GnAuvwNXZT0ZQicQZVYkiGqXY9PooBdreBlPoKJZiSTITpvGVrFlwVpoCh6AiB AmHMLVrd3r/BhE1MTs04AjUXcjOez5w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704283049; x=1735819049; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1FOPeXbjJ77c/Z5hxK8G6Z5lgHiNNwr1dCdzU2FnUHQ=; b=C+datJ8pPn9DkUUxmNJBd/mmLDyaHiM89UxleBhBLy6CqMJ3NYM1r56e YhA6w1NmUPiMWYjMwvQRd2OYxAvTdiE07j5m1mppIQwu+ekBOvjhw956Q 1VaHrK0oUGHv7Pn5qRI8e41ykhm+wNBJjrdKl+cOktt73KrCyniEVfF5C vrrPRybtX5QJcrzsaXfCRy277RFIYhu2KiB+Iin5lzzInN5X71DtBXCPP rxtbSHYQYVqFkagUtj8hy4FV/dEiqToWvUzGpxvirnASQd4Dnd2xtrU2/ 999XT6vXhKqSy0qfuV0F/nStxo5ReYivBI1g8IqMjvqG77Gqr2Y4MwVi4 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10941"; a="15640900" X-IronPort-AV: E=Sophos;i="6.04,327,1695711600"; d="scan'208";a="15640900" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2024 03:57:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10941"; a="756195431" X-IronPort-AV: E=Sophos;i="6.04,327,1695711600"; d="scan'208";a="756195431" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 03 Jan 2024 03:57:22 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rKzs7-000M2m-2U; Wed, 03 Jan 2024 11:57:19 +0000 Date: Wed, 3 Jan 2024 19:56:57 +0800 From: kernel test robot To: Kairui Song , linux-mm@kvack.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Andrew Morton , Linux Memory Management List , Chris Li , "Huang, Ying" , Hugh Dickins , Johannes Weiner , Matthew Wilcox , Michal Hocko , Yosry Ahmed , David Hildenbrand , linux-kernel@vger.kernel.org, Kairui Song Subject: Re: [PATCH v2 9/9] mm/swap, shmem: use new swapin helper to skip readahead conditionally Message-ID: <202401031953.WBMZtIe7-lkp@intel.com> References: <20240102175338.62012-10-ryncsn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240102175338.62012-10-ryncsn@gmail.com> X-Rspamd-Queue-Id: 029CB80006 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: qk3xyezr19gg3nosi7hcmherxcmod3yh X-HE-Tag: 1704283048-131463 X-HE-Meta: U2FsdGVkX1/6GvW/JaEZTg3qaI928DetbJssQgLCtE/OofyEJtgUP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2i1raSOxV3yCaUe6GfvDrmy7KlTirIc3fdcDgm2j6qb6MxLO9D5GJfziU7U2a4/UsknEg5S1+3kyt1TnC3tMqUwgbo5WiBZcOsuJyGnxebnSYuFlkO524o8EG6rG7IJAP2+BtW3wRMrzg2k5WmuhxefM/Mxk52YQV9o5FQvK1OH5u97sZjA4LD4yxBYnNlf14BTrlvuyEOm9K3D2dHoN3ed/mZPkmGLFQz/qc/9N2dgy4LImrx8kdeCxZ0= 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: List-Subscribe: List-Unsubscribe: Hi Kairui, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on next-20240103] [cannot apply to linus/master v6.7-rc8] [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/Kairui-Song/mm-swapfile-c-add-back-some-comment/20240103-015650 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20240102175338.62012-10-ryncsn%40gmail.com patch subject: [PATCH v2 9/9] mm/swap, shmem: use new swapin helper to skip readahead conditionally config: arm-randconfig-004-20240103 (https://download.01.org/0day-ci/archive/20240103/202401031953.WBMZtIe7-lkp@intel.com/config) compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project baf8a39aaf8b61a38b5b2b5591deb765e42eb00b) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240103/202401031953.WBMZtIe7-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202401031953.WBMZtIe7-lkp@intel.com/ All errors (new ones prefixed by >>): >> mm/shmem.c:1864:8: error: incompatible pointer types assigning to 'struct folio *' from 'struct page *' [-Werror,-Wincompatible-pointer-types] 1864 | folio = swapin_entry_mpol(swap, gfp, mpol, ilx, &cache_result); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. vim +1864 mm/shmem.c 1826 1827 /* 1828 * Swap in the folio pointed to by *foliop. 1829 * Caller has to make sure that *foliop contains a valid swapped folio. 1830 * Returns 0 and the folio in foliop if success. On failure, returns the 1831 * error code and NULL in *foliop. 1832 */ 1833 static int shmem_swapin_folio(struct inode *inode, pgoff_t index, 1834 struct folio **foliop, enum sgp_type sgp, 1835 gfp_t gfp, struct mm_struct *fault_mm, 1836 vm_fault_t *fault_type) 1837 { 1838 struct address_space *mapping = inode->i_mapping; 1839 struct shmem_inode_info *info = SHMEM_I(inode); 1840 enum swap_cache_result cache_result; 1841 struct swap_info_struct *si; 1842 struct folio *folio = NULL; 1843 struct mempolicy *mpol; 1844 swp_entry_t swap; 1845 pgoff_t ilx; 1846 int error; 1847 1848 VM_BUG_ON(!*foliop || !xa_is_value(*foliop)); 1849 swap = radix_to_swp_entry(*foliop); 1850 *foliop = NULL; 1851 1852 if (is_poisoned_swp_entry(swap)) 1853 return -EIO; 1854 1855 si = get_swap_device(swap); 1856 if (!si) { 1857 if (!shmem_confirm_swap(mapping, index, swap)) 1858 return -EEXIST; 1859 else 1860 return -EINVAL; 1861 } 1862 1863 mpol = shmem_get_pgoff_policy(info, index, 0, &ilx); > 1864 folio = swapin_entry_mpol(swap, gfp, mpol, ilx, &cache_result); 1865 mpol_cond_put(mpol); 1866 1867 if (!folio) { 1868 error = -ENOMEM; 1869 goto failed; 1870 } 1871 if (cache_result != SWAP_CACHE_HIT) { 1872 if (fault_type) { 1873 *fault_type |= VM_FAULT_MAJOR; 1874 count_vm_event(PGMAJFAULT); 1875 count_memcg_event_mm(fault_mm, PGMAJFAULT); 1876 } 1877 } 1878 1879 /* We have to do this with folio locked to prevent races */ 1880 folio_lock(folio); 1881 if (cache_result != SWAP_CACHE_BYPASS) { 1882 /* With cache bypass, folio is new allocated, sync, and not in cache */ 1883 if (!folio_test_swapcache(folio) || folio->swap.val != swap.val) { 1884 error = -EEXIST; 1885 goto unlock; 1886 } 1887 if (!folio_test_uptodate(folio)) { 1888 error = -EIO; 1889 goto failed; 1890 } 1891 folio_wait_writeback(folio); 1892 } 1893 if (!shmem_confirm_swap(mapping, index, swap)) { 1894 error = -EEXIST; 1895 goto unlock; 1896 } 1897 1898 /* 1899 * Some architectures may have to restore extra metadata to the 1900 * folio after reading from swap. 1901 */ 1902 arch_swap_restore(swap, folio); 1903 1904 /* With cache bypass, folio is new allocated and always respect gfp flags */ 1905 if (cache_result != SWAP_CACHE_BYPASS && shmem_should_replace_folio(folio, gfp)) { 1906 error = shmem_replace_folio(&folio, gfp, info, index); 1907 if (error) 1908 goto failed; 1909 } 1910 1911 /* 1912 * The expected value checking below should be enough to ensure 1913 * only one up-to-date swapin success. swap_free() is called after 1914 * this, so the entry can't be reused. As long as the mapping still 1915 * has the old entry value, it's never swapped in or modified. 1916 */ 1917 error = shmem_add_to_page_cache(folio, mapping, index, 1918 swp_to_radix_entry(swap), gfp); 1919 if (error) 1920 goto failed; 1921 1922 shmem_recalc_inode(inode, 0, -1); 1923 1924 if (sgp == SGP_WRITE) 1925 folio_mark_accessed(folio); 1926 1927 if (cache_result != SWAP_CACHE_BYPASS) 1928 delete_from_swap_cache(folio); 1929 folio_mark_dirty(folio); 1930 swap_free(swap); 1931 put_swap_device(si); 1932 1933 *foliop = folio; 1934 return 0; 1935 failed: 1936 if (!shmem_confirm_swap(mapping, index, swap)) 1937 error = -EEXIST; 1938 if (error == -EIO) 1939 shmem_set_folio_swapin_error(inode, index, folio, swap); 1940 unlock: 1941 if (folio) { 1942 folio_unlock(folio); 1943 folio_put(folio); 1944 } 1945 put_swap_device(si); 1946 1947 return error; 1948 } 1949 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki