Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5906954pxb; Tue, 16 Feb 2021 10:25:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjpI0DJxmQjM1h/Y64PbMkipKOzR8ZVnxpFfQ+qsLCgx7krw+kiN1MBT2RraoaIA8PMwY1 X-Received: by 2002:a17:906:af6b:: with SMTP id os11mr21822347ejb.472.1613499943971; Tue, 16 Feb 2021 10:25:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613499943; cv=none; d=google.com; s=arc-20160816; b=escpc2UMcc3/uURfqvFj69rcCR8jLSfjFx/R85MmIy8TGA7eU8AD2NzfcsC+9LCsqG h5KRY8LPVOFoHKw9fVL9ePXMwPfTcuzo8q9j3fVFksxW0MYDuQJWQcbiEPgy60C3Ur3d JpEW2ZmY6ipOB7DVCkAj0cpCBhSH5UaBiJoBBPKmewXD3zMO+9tyqHTX/GqYFzpUQ21R 8u9lLpRWmuPzZmpYgRpjDHf1v8hIRtQgpXgatUPRvZe8U6hFJj8Qrg2CShJ/72L4iHTW tc5o04iBLK08MQRScwVUh4oT756YO1cQWPr0lCthag/nqZZjErScBpPEK4zSkcDwPfTE LTsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v7reJc7owJgByy7BxY9foagf56Geahv9BK/jtA7FcW4=; b=HVxxF6J9ZhIxD50eF37tu1rBpnS2H1sC6l5U4TbumPBns8kZDX0z/rqvaDM1BhP0aA th4tapB3qVE3kfo0kZzFXYCktKbGIcSpLLS8ennqOoO5SgPmqxhTHwJLl+dL5INlH9Q3 OtSWLcg1HVP97Sczw3UaEgY9iQ9KKyXDgfV26DKiWmdW6bTNYV/pMxSGurCDL0ZpfPW5 PLgFfGFLzXuLNOckZ17MACTdsie68SZ/U3i3EuXz0WvRRHNKafi/a+kfskVlf87Hu26O bQl7p+ez71h/ZC4tOm9p3aimlj9TDRygsu+buT60wsdjQQ/Uk2l495OMJYZWU+c4hAip C6gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T1w0z1Mt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l1si16105972edk.364.2021.02.16.10.25.15; Tue, 16 Feb 2021 10:25:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T1w0z1Mt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhBPSYN (ORCPT + 99 others); Tue, 16 Feb 2021 13:24:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbhBPSYL (ORCPT ); Tue, 16 Feb 2021 13:24:11 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 882E9C061574; Tue, 16 Feb 2021 10:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=v7reJc7owJgByy7BxY9foagf56Geahv9BK/jtA7FcW4=; b=T1w0z1MtJ3DTQt+fih9hSXxI2q lBlwnq22TihAW9jnXLU8eVOczWZTOv9CFjZ3j7Nb2cnzHR8ULzF3+6kCMq+vMhm8hAJbl0Cuu0uiL uqzdEGhbHLMTCxuzLxWlLXTzVoRYUhIvGI1GgfFFKb4n9p3WWy9Dhk8CC7vkj+uWWzWUs2PA6YumQ o6n5h6TkbmIoni0v+S1gaSupvP23+bV2JWBTb4FPDbTLmDQfGgCc1FFs6RWIunvhp7/jxkiGTcFJ5 d+oBUbDFXxLnMXGHa3UH/LLIGUTpmaEWLN4U1q+NdbIToJ9MQim3zz4UdA9cMhAUsCbsIRsppuflf WUwgHZ+w==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lC4zi-00H9aV-GT; Tue, 16 Feb 2021 18:22:49 +0000 Date: Tue, 16 Feb 2021 18:22:42 +0000 From: Matthew Wilcox To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , cgoldswo@codeaurora.org, linux-fsdevel@vger.kernel.org, mhocko@suse.com, david@redhat.com, vbabka@suse.cz, viro@zeniv.linux.org.uk, joaodias@google.com Subject: Re: [RFC 1/2] mm: disable LRU pagevec during the migration temporarily Message-ID: <20210216182242.GJ2858050@casper.infradead.org> References: <20210216170348.1513483-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210216170348.1513483-1-minchan@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 09:03:47AM -0800, Minchan Kim wrote: > LRU pagevec holds refcount of pages until the pagevec are drained. > It could prevent migration since the refcount of the page is greater > than the expection in migration logic. To mitigate the issue, > callers of migrate_pages drains LRU pagevec via migrate_prep or > lru_add_drain_all before migrate_pages call. > > However, it's not enough because pages coming into pagevec after the > draining call still could stay at the pagevec so it could keep > preventing page migration. Since some callers of migrate_pages have > retrial logic with LRU draining, the page would migrate at next trail > but it is still fragile in that it doesn't close the fundamental race > between upcoming LRU pages into pagvec and migration so the migration > failure could cause contiguous memory allocation failure in the end. Have you been able to gather any numbers on this? eg does migration now succeed 5% more often?