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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 0ABFFC07E9D for ; Mon, 19 Jul 2021 12:08:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 894DE6113A for ; Mon, 19 Jul 2021 12:08:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 894DE6113A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2D4878D00F4; Mon, 19 Jul 2021 08:08:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 20EFA8D00EC; Mon, 19 Jul 2021 08:08:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 060358D00F4; Mon, 19 Jul 2021 08:08:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id AA7EE8D00EC for ; Mon, 19 Jul 2021 08:08:44 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1539E18259E45 for ; Mon, 19 Jul 2021 12:08:43 +0000 (UTC) X-FDA: 78379215726.16.B2480DE Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf01.hostedemail.com (Postfix) with ESMTP id C9FF55012701 for ; Mon, 19 Jul 2021 12:08:41 +0000 (UTC) Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GT0r45Vblz7tj5; Mon, 19 Jul 2021 20:04:04 +0800 (CST) Received: from [10.174.177.180] (10.174.177.180) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 19 Jul 2021 20:08:38 +0800 Subject: Re: linux-5.13.2: warning from kernel/rcu/tree_plugin.h:359 To: Oleksandr Natalenko , Matthew Wilcox CC: Boqun Feng , Zhouyi Zhou , , linux-kernel , , Chris Clayton , Chris Rankin , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu , Andrew Morton , Linux-MM , "Huang, Ying" , References: <8058e175-cec5-c243-6499-c1cd4e3c8605@huawei.com> <2145858.R0O0FObHBN@natalenko.name> From: Miaohe Lin Message-ID: <688a2cb1-5cd8-2c00-889c-4d48021371f8@huawei.com> Date: Mon, 19 Jul 2021 20:08:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <2145858.R0O0FObHBN@natalenko.name> Content-Type: text/plain; charset="utf-8" Content-Language: en-US X-Originating-IP: [10.174.177.180] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=none) header.from=huawei.com X-Stat-Signature: n4go4fxqxkn89kynikaxn8o7coya3t8e X-Rspamd-Queue-Id: C9FF55012701 X-Rspamd-Server: rspam01 X-HE-Tag: 1626696521-551424 Content-Transfer-Encoding: quoted-printable 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: On 2021/7/19 19:59, Oleksandr Natalenko wrote: > On pond=C4=9Bl=C3=AD 19. =C4=8Dervence 2021 13:50:07 CEST Miaohe Lin wr= ote: >> On 2021/7/19 19:22, Matthew Wilcox wrote: >>> On Mon, Jul 19, 2021 at 07:12:58PM +0800, Miaohe Lin wrote: >>>> When in the commit 2799e77529c2a, we're using the percpu_ref to seri= alize >>>> against concurrent swapoff, i.e. there's percpu_ref inside >>>> get_swap_device() instead of rcu_read_lock(). Please see commit >>>> 63d8620ecf93 ("mm/swapfile: use percpu_ref to serialize against >>>> concurrent swapoff") for detail. >>> >>> Oh, so this is a backport problem. 2799e77529c2 was backported witho= ut >>> its prerequisite 63d8620ecf93. Greg, probably best to just drop >> >> Yes, they're posted as a patch set: >> >> https://lkml.kernel.org/r/20210426123316.806267-1-linmiaohe@huawei.com >> >>> 2799e77529c2 from all stable trees; the race described is not very >>> important (swapoff vs reading a page back from that swap device). >>> . >> >> The swapoff races with reading a page back from that swap device shoul= d be >> really uncommon as most users only do swapoff when the system is going= to >> shutdown. >> >> Sorry for the trouble! >=20 > git log --oneline v5.13..v5.13.3 --author=3D"Miaohe Lin" > 11ebc09e50dc mm/zswap.c: fix two bugs in zswap_writeback_entry() > 95d192da198d mm/z3fold: use release_z3fold_page_locked() to release loc= ked=20 > z3fold page > ccb7848e2344 mm/z3fold: fix potential memory leak in z3fold_destroy_poo= l() > 9f7229c901c1 mm/huge_memory.c: don't discard hugepage if other processe= s are=20 > mapping it > f13259175e4f mm/huge_memory.c: add missing read-only THP checking in=20 > transparent_hugepage_enabled() > afafd371e7de mm/huge_memory.c: remove dedicated macro HPAGE_CACHE_INDEX= _MASK > a533a21b692f mm/shmem: fix shmem_swapin() race with swapoff > c3b39134bbd0 swap: fix do_swap_page() race with swapoff >=20 > Do you suggest reverting "mm/shmem: fix shmem_swapin() race with swapof= f" as=20 > well? This patch also rely on its prerequisite 63d8620ecf93. I think we should = either revert any commit in this series or just backport the entire series. Many thanks. >=20