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 X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3001CC433E2 for ; Mon, 14 Sep 2020 16:55:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3141217BA for ; Mon, 14 Sep 2020 16:55:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="d20rYKoM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726291AbgINQzB (ORCPT ); Mon, 14 Sep 2020 12:55:01 -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(); 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 X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AFFBC43461 for ; Mon, 14 Sep 2020 16:50:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 038142193E for ; Mon, 14 Sep 2020 16:50:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="d20rYKoM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 038142193E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E8956E2F2; Mon, 14 Sep 2020 16:50:41 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1B0596E2F2 for ; Mon, 14 Sep 2020 16:50:41 +0000 (UTC) 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 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-Disposition: inline In-Reply-To: Subject: Re: [Intel-gfx] [PATCH v2 3/8] mm: Optimise madvise WILLNEED X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: William Kucharski , intel-gfx@lists.freedesktop.org, Johannes Weiner , Hugh Dickins , linux-kernel@vger.kernel.org, Chris Wilson , linux-mm@kvack.org, Matthew Auld , Huang Ying , cgroups@vger.kernel.org, Andrew Morton , Alexey Dobriyan Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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(); _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH v2 3/8] mm: Optimise madvise WILLNEED Date: Mon, 14 Sep 2020 17:50:32 +0100 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-Transfer-Encoding: 7bit Return-path: 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==; Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Qian Cai Cc: William Kucharski , intel-gfx@lists.freedesktop.org, Johannes Weiner , Hugh Dickins , linux-kernel@vger.kernel.org, Chris Wilson , linux-mm@kvack.org, Matthew Auld , Huang Ying , cgroups@vger.kernel.org, Andrew Morton , Alexey Dobriyan 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();