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 9989AC3DA6E for ; Wed, 3 Jan 2024 13:46:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EA0D38D006B; Wed, 3 Jan 2024 08:46:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E508B8D0061; Wed, 3 Jan 2024 08:46:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF0EB8D006B; Wed, 3 Jan 2024 08:46:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id BE8B98D0061 for ; Wed, 3 Jan 2024 08:46:11 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 85E6C140998 for ; Wed, 3 Jan 2024 13:46:11 +0000 (UTC) X-FDA: 81638123742.19.3CF93D4 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by imf17.hostedemail.com (Postfix) with ESMTP id 6C0A140011 for ; Wed, 3 Jan 2024 13:46:08 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=D9dPndru; spf=pass (imf17.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 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=1704289569; a=rsa-sha256; cv=none; b=juvdLJ+i62wB2DzPfCBr3Xkto9bypObhJd0gEDljkz2wWaNEJgZafubhoI9QcYYz4PAzcV 8wJgk0Cn4LUkoCeCK1mMDujOLf+QpWGVfNp/DB/m6u25xiTZs46uquEuhQ/qTlv7jvg9oL jReeUYSUmYcUbkd4qEBuFU6YMzTxpes= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=D9dPndru; spf=pass (imf17.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1704289569; 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=It/xxW3dU0Zihz7djTr/Ya1uFvsDuIhPe30eASM/Xqw=; b=FBhhMjKFK1LUx5JXUiKQlszFch6rub++TwWVxDgYpYtOLVxVXcB6EEl2tC57Yp/0uhEpxX pkN37hy8y126eD2Q6gyoz/yJkdaF0HalGPKeRsJrhn/NOloeXz3EpFq4WtZ5ZEad8xcADn gXRZNWrbxyP1aYXxO9CJs8OLRTbSrlA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704289568; x=1735825568; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=wo4vXKNhQeRIYYDB4t1oeYbbO1FCym44pBdQ5gtEaKU=; b=D9dPndru2AdjeSDS2hUBWyYvm4jgnCr4Q7jAKfmZfnhOPyFiwWV9OuYu GfDucMqwOOCmzWtLUbVXkIu/Ppz1NiGoiwh189PDGhB5dbffh1AndwbcZ W7zgUM/sHebztZezbceWVo9K0xs53PmaeIOBAQSkftTrarIvt7h2fOIcn qBunP102wz/u5c5cAGuX0wAxoDYJZD39dTSrnkoVyuzN747/EV9PBEWUO IvdNONynuOmpSc7f2ogqh5buw057GvWhWYzpvEwnv1fJS9LqFxCVcgF3o Sbfl3IBpPSth3Be3Eo1S14qh0byxmev80hPSjYo+Bkqu86R85MIDONrG4 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10942"; a="395885014" X-IronPort-AV: E=Sophos;i="6.04,327,1695711600"; d="scan'208";a="395885014" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2024 05:46:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10942"; a="923542104" X-IronPort-AV: E=Sophos;i="6.04,327,1695711600"; d="scan'208";a="923542104" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by fmsmga001.fm.intel.com with ESMTP; 03 Jan 2024 05:46:03 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rL1ZJ-000M8m-0u; Wed, 03 Jan 2024 13:46:01 +0000 Date: Wed, 3 Jan 2024 21:45:34 +0800 From: kernel test robot To: Kairui Song , linux-mm@kvack.org Cc: 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: <202401032120.uWKybc56-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-Server: rspam08 X-Rspamd-Queue-Id: 6C0A140011 X-Stat-Signature: 37u3591pj7nabfgqhbf1x76a4rpu41pk X-Rspam-User: X-HE-Tag: 1704289568-616671 X-HE-Meta: U2FsdGVkX1+vWipWQ9VYmOpBPmM732+qmrtMEMc39w8FMxyt3fDpeeKptauAmeKmlB86dl9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GaAb5Dp1U3p9bqgtiXyH3voV8OyhvSBTddMq0niAlprtMW4t+auomQ4PY92GACWpy6lxJfX9d7ANUFfI+rr8fBmL/DcpJIreE+tf5jkdi1JpRrhkofw+KxQHsPmPUTHUzpGPNMhRJuQAz4UppzUFGbTXi41UwK0q4406p22RdF8v8HGplAbkx6N0AAePUqR2V/qPuUrVyaZ0y03ibvYUHRsUELhSXNEgJpaF4KWj0= 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: i386-randconfig-014-20240103 (https://download.01.org/0day-ci/archive/20240103/202401032120.uWKybc56-lkp@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240103/202401032120.uWKybc56-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/202401032120.uWKybc56-lkp@intel.com/ All errors (new ones prefixed by >>): mm/shmem.c: In function 'shmem_swapin_folio': >> mm/shmem.c:1864:8: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] folio = swapin_entry_mpol(swap, gfp, mpol, ilx, &cache_result); ^ cc1: some warnings being treated as errors 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