Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2417727pxk; Mon, 14 Sep 2020 12:47:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgcfhzIzAELLSJmxBhYIe42BrhTjBHBJbWWrOlvdnD0fr1ieFoSkbV+DXwMc533lyvr6Mp X-Received: by 2002:a17:906:3791:: with SMTP id n17mr16124350ejc.216.1600112847016; Mon, 14 Sep 2020 12:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600112847; cv=none; d=google.com; s=arc-20160816; b=LydZmrm6OZnLCzP3S9xWXjMf0mvHMCMIOaEamTjwCM8A0xLpc8m9cMYOk2FP5o4bhw fy8zWR2dMHTbNZd99G/1R8wC247rBKaKlcfS8tm7hR/jZdgouTwYCGoNlwvfoQyUfjOT k86RP26zRmsxzDqMbCXQbmjh8F8TDvgOBWhhg8sfUITG5iyJt+t+6zfrL2o8xxm/Cn+J MMu6AJhLWvjriEn2108v5KOUovWt7G0k9bzF+cQrpyRi/JHXgQBeuYm4bBMttbeYLwW/ oUWnQNCtGSLpjpbbqujocISo97qs9Cp6zc7S8KdGVZHHxok+CaE0xYQ4eHuBLf4fqCqG pVuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=A/DjrjveF5/2wA8RTl0T9a0Cox1J1OLY+rMuhaYpfao=; b=GaamoMuJiBvHp/SEfIt0tW0qtCJeIWq7Mr+csFIhn8oQ8iHWbCB/ck/27AWqSsnMHs em9BFJ4fojLT115fhoO+W978uacTJ8Kx610dkoPorFZtK+OIYR1I40Qtcbp0HsIz5UQ3 6fgo7YTUNXY1G6dpnRupR+0u2x2irGvmzcRPqKEU3YW0N1gHgBGh5WBV8/Deoui9jV3h OoWZhf5tutzlJLviSVp3exiC4Y8vHg4pKSk34VHb7jV7FhKC9rcjl+aN7T5XdycGbNts Q/oOM7SWR4iq/sFV1uQDGmdtOJZJb995LwxcQaqHilRcO4BLyDYhu9GGR1Ve1zlfGsjl WXXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="iU4h2vv/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si7060321ejf.18.2020.09.14.12.47.04; Mon, 14 Sep 2020 12:47:27 -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=pass header.i=@redhat.com header.s=mimecast20190719 header.b="iU4h2vv/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725990AbgINTow (ORCPT + 99 others); Mon, 14 Sep 2020 15:44:52 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:23496 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725964AbgINTov (ORCPT ); Mon, 14 Sep 2020 15:44:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600112690; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A/DjrjveF5/2wA8RTl0T9a0Cox1J1OLY+rMuhaYpfao=; b=iU4h2vv/M1zUWJJz3Pm72a/wlgb/ICjPAbhhKRyOKH64W14MyQnKrWpLxLP/bp+H4sXp63 QxHNa9MkaaBA/+HL5IM82Kll7c4Tj4Ta+th02dHDNj1ynlbZrV2izvmZYL0VHEt1F3LO4X UHIH2ObFAXPo+z1V/z4LuGGARwz5QTI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-210-JgGmMpLmOG2xlwIrBHTevw-1; Mon, 14 Sep 2020 15:44:43 -0400 X-MC-Unique: JgGmMpLmOG2xlwIrBHTevw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 773238015AA; Mon, 14 Sep 2020 19:44:41 +0000 (UTC) Received: from ovpn-113-249.rdu2.redhat.com (ovpn-113-249.rdu2.redhat.com [10.10.113.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACF737513E; Mon, 14 Sep 2020 19:44:39 +0000 (UTC) Message-ID: <05803c18b64db8a811c692bcbdc03172935ea483.camel@redhat.com> Subject: Re: [PATCH v2 3/8] mm: Optimise madvise WILLNEED From: Qian Cai To: Matthew Wilcox 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 Date: Mon, 14 Sep 2020 15:44:39 -0400 In-Reply-To: <20200914165032.GS6583@casper.infradead.org> References: <20200910183318.20139-1-willy@infradead.org> <20200910183318.20139-4-willy@infradead.org> <20200914165032.GS6583@casper.infradead.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-09-14 at 17:50 +0100, Matthew Wilcox wrote: > 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? It works fine. > > 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(); > >