Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2312401pxk; Mon, 14 Sep 2020 09:55:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDf0rSx/MHjD30/6kZ7xXe7T2U8h+cdVXG+mtYPkLlqSW+gWa9AaaCSIhuanLUGTDzv2IV X-Received: by 2002:a17:907:9c3:: with SMTP id bx3mr15932847ejc.164.1600102554541; Mon, 14 Sep 2020 09:55:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600102554; cv=none; d=google.com; s=arc-20160816; b=djzcWRqk63Qj6hlM3xjNCWGfbsmXZh482FYZe6vNKkoCaHzcv8JYeg9mn9vLY4+PvG zBkEa8fZ/98Jd+ER61GWzEhEFAhUoxf95Bb5bXouD/3rsa7wdAjXiIeYYcaiJ2JWerwt YlpDHGiPuEymiaWUuIs7+MUN4H5ZICWzLfwVqd/c+Eh6EaJTqik9hj2pPiw51Ul2lDPC gFa1/HGPDBkuY//dGlOEiTmmoHKrYjpqqZQcw6pSaMKxJutM23lqe/mg8M6BB6BwQ7qM Rl/9dCK23tIhAEyT1UDQfzigcw4E/kJrO96ohi4gpkoXZ81EdWDiOMQ54mt5CD0LKP1J Hciw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ONEBRln/W01sImpX9+NYKevjldL0jmS6ROdAPg7RGBo=; b=hvuSx9xHYVSdAF7Yn1eJh9jTPfMTO6K09u5Q1xoet1r3Syu/4S5rsYKyzdY0rBo2wX eIveSxJCzJz4MmOljTxEMnpmiVPY/cdylOCMH6Nk7fHM+UNx9DywR5SERVpNholtcjah 91q/W/oilDTIyJY1QENzR0dtT2XihJ0/Smjq9wLKHLmdpgz86fCUDzq7Npzcwd0ImtJ/ czsNQtvT12OQN+bCql5Cg5w7Qwv/MlGm1xo3X8NX2JlXPLIBE8AIZ5NG4qvgP0zJp2Dl bLFV/9Phmu+LzaGHVfeVglyZFuUA09ViuYId1ypLVfTrAW/nlVgVbpMbJ6CUTvP/2N35 dGcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=d20rYKoM; 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 bs11si7826185edb.90.2020.09.14.09.55.31; Mon, 14 Sep 2020 09:55:54 -0700 (PDT) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=d20rYKoM; 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 S1726097AbgINQyi (ORCPT + 99 others); Mon, 14 Sep 2020 12:54:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbgINQun (ORCPT ); Mon, 14 Sep 2020 12:50:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41EBAC06174A; Mon, 14 Sep 2020 09:50:43 -0700 (PDT) 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=ONEBRln/W01sImpX9+NYKevjldL0jmS6ROdAPg7RGBo=; b=d20rYKoM3MFFGhKV+vJP3AYgTj mwiFsplmERWLiFhdGa/edRGM+Qj9ahLzBKxByDwrrNrodrlLBFd+1uxwJNSncFSR/DD/F8eYJ5rpd EWsrP4oBnQqVW69V09WhLgJDPlKrXa8ft32xDOYXKu7Bgk67FVD/8Jbrd6iHTXw2MTrw/1EsWJ3ne U0zv3kyDd+IGx1DtSu4NHxadm7YDbRJCUD6CifAvTitUWGFAaXv+75kmqz8whwirQbRHFU2JP0SQa 20qFkwfkN4dRDAt7KOAwTrSVq9FT/o5iGlEJyqm8QeKBfLHUzYc5Q4s1ILBQr52OTeC3zWItAqCYw TLiYM1yg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHrgX-0001cn-28; Mon, 14 Sep 2020 16:50:33 +0000 Date: Mon, 14 Sep 2020 17:50:32 +0100 From: Matthew Wilcox To: Qian Cai Cc: linux-mm@kvack.org, intel-gfx@lists.freedesktop.org, Huang Ying , Hugh Dickins , linux-kernel@vger.kernel.org, Chris Wilson , William Kucharski , Johannes Weiner , cgroups@vger.kernel.org, Andrew Morton , Alexey Dobriyan , Matthew Auld Subject: Re: [PATCH v2 3/8] mm: Optimise madvise WILLNEED Message-ID: <20200914165032.GS6583@casper.infradead.org> References: <20200910183318.20139-1-willy@infradead.org> <20200910183318.20139-4-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 14, 2020 at 12:17:07PM -0400, Qian Cai wrote: > Reverting the "Return head pages from find_*_entry" patchset [1] up to this > patch fixed the issue that LTP madvise06 test [2] would trigger endless soft- > lockups below. It does not help after applied patches fixed other separate > issues in the patchset [3][4]. Thanks for the report. Could you try this? diff --git a/mm/madvise.c b/mm/madvise.c index 96189acd6969..2d9ceccb338d 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -234,6 +234,7 @@ static void force_shm_swapin_readahead(struct vm_area_struct *vma, if (!xa_is_value(page)) continue; + xas_pause(&xas); rcu_read_unlock(); swap = radix_to_swp_entry(page); @@ -243,7 +244,6 @@ static void force_shm_swapin_readahead(struct vm_area_struct *vma, put_page(page); rcu_read_lock(); - xas_reset(&xas); } rcu_read_unlock();