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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 7CD3DC4727E for ; Fri, 25 Sep 2020 17:35:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E940721D42 for ; Fri, 25 Sep 2020 17:35:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="m4O7tYfi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E940721D42 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 433696B0068; Fri, 25 Sep 2020 13:35:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E46D6B006C; Fri, 25 Sep 2020 13:35:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AD976B006E; Fri, 25 Sep 2020 13:35:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id 0FD286B0068 for ; Fri, 25 Sep 2020 13:35:17 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A33E48249980 for ; Fri, 25 Sep 2020 17:35:16 +0000 (UTC) X-FDA: 77302285032.06.turn09_180ea7027169 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 68A8C101C4854 for ; Fri, 25 Sep 2020 17:35:16 +0000 (UTC) X-HE-Tag: turn09_180ea7027169 X-Filterd-Recvd-Size: 6451 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Fri, 25 Sep 2020 17:35:15 +0000 (UTC) Received: by mail-lj1-f178.google.com with SMTP id k25so3113807ljg.9 for ; Fri, 25 Sep 2020 10:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qur/7fLUQQ7M8HcyXzGgRmzT/BT3EA18MOp9o+vXhw4=; b=m4O7tYfi+LCjjaX259cRmfSEkU9ANtBCnhcXbGdDSAkoly60jiLCi3EeKpG07gAcoW +Wto5sbywnY6Hd66eKnVr3ouoFUsth7BsWjZYIJTqVpk4I8cS2V1j/q86ygavcMJNQX3 idQuds9V3xtHdlbaZYzJGZOujmPv3rLVOM7yFglYVXB+MepKm8MjBNp7GqumbzT0sPrJ OHe7/vkjySw4w2L+dMdYgr9lmY49rg1gOXR3EWsnNwU9hXQfzTuiJGcli65em57braNw qCFaNtwvdf0aS2TLIVDD4uaKRkr0qoBHQPspRmjgtvhgPKLiVBAHC4uV/xoDn64Yaa6e y7IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qur/7fLUQQ7M8HcyXzGgRmzT/BT3EA18MOp9o+vXhw4=; b=Wut8LiXmx9TuA/qulAXRcfBtHJzQP1Gf0Qk+bzyUu93NnY2yBwkWGWdbVuYO3pYw0y dOtBGMc5ZpXmhnAOI9ujYWRadqIZC8zaAbeLw+41ELsJQepFNP11DFVB4UxxvA+3KUgT BcPx3pRf3QN2lGWmeBhqM4qlSRcbnQ1PFH4tUE3+HAcJA2eKmg16821C2u9oSQoACPP6 g3I55CF16w+I0DznmPCQv2jcnltDsqlozoP8nVSGR9CMxtUpKsMe/MZyXszp4uH99VA2 E1W06fAqWADHhUrkt2xWVzLSVPP8dFdRIfE4MdePb5sdP37NBLJJRtdR3QCx31wfw2pr VC+w== X-Gm-Message-State: AOAM530PO5duB44IZOcOrbL4SwqBL5+NbRf9wnGfoeotgKkl2N7baUQF vDPveTdd2GdA7QnEX+O09oPN7GDUicqUXciu8ka5/Q== X-Google-Smtp-Source: ABdhPJww9rGC7xLbm/a5AUCqZn+u7vM4jrVP8ohJ3SXGjFK55/Cin/pgBfqfgrAVY0ajf7iXLZcHF33PReQm1QIMLPc= X-Received: by 2002:a2e:7c09:: with SMTP id x9mr1585757ljc.192.1601055314188; Fri, 25 Sep 2020 10:35:14 -0700 (PDT) MIME-Version: 1.0 References: <20200915073303.GA754106@T590> <20200915224541.GB38283@mit.edu> <20200915230941.GA791425@T590> <20200916202026.GC38283@mit.edu> <20200917022051.GA1004828@T590> <20200917143012.GF38283@mit.edu> <20200924005901.GB1806978@T590> <20200924143345.GD482521@mit.edu> <20200925011311.GJ482521@mit.edu> <20200925073145.GC2388140@T590> <20200925161918.GD2388140@T590> In-Reply-To: From: Shakeel Butt Date: Fri, 25 Sep 2020 10:35:03 -0700 Message-ID: Subject: Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag To: Linus Torvalds Cc: Ming Lei , "Theodore Y. Ts'o" , Jens Axboe , Ext4 Developers List , "linux-kernel@vger.kernel.org" , linux-block , Linux-MM , Roman Gushchin , Andrew Morton , Johannes Weiner , Vlastimil Babka Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000008, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Sep 25, 2020 at 10:22 AM Shakeel Butt wrote: > > On Fri, Sep 25, 2020 at 10:17 AM Linus Torvalds > wrote: > > > > On Fri, Sep 25, 2020 at 9:19 AM Ming Lei wrote: > > > > > > git bisect shows the first bad commit: > > > > > > [10befea91b61c4e2c2d1df06a2e978d182fcf792] mm: memcg/slab: use a single set of > > > kmem_caches for all allocations > > > > > > And I have double checked that the above commit is really the first bad > > > commit for the list corruption issue of 'list_del corruption, ffffe1c241b00408->next > > > is LIST_POISON1 (dead000000000100)', > > > > Thet commit doesn't revert cleanly, but I think that's purely because > > we'd also need to revert > > > > 849504809f86 ("mm: memcg/slab: remove unused argument by charge_slab_page()") > > 74d555bed5d0 ("mm: slab: rename (un)charge_slab_page() to > > (un)account_slab_page()") > > > > too. > > > > Can you verify that a > > > > git revert 74d555bed5d0 849504809f86 10befea91b61 > > > > on top of current -git makes things work for you again? > > > > I'm going to do an rc8 this release simply because we have another VM > > issue that I hope to get fixed - but there we know what the problem > > and the fix _is_, it just needs some care. > > > > So if Roman (or somebody else) can see what's wrong and we can fix > > this quickly, we don't need to go down the revert path, but .. > > > > I think I have a theory. The issue is happening due to the potential > infinite recursion: > > [ 5060.124412] ___cache_free+0x488/0x6b0 > *****Second recursion > [ 5060.128666] kfree+0xc9/0x1d0 > [ 5060.131947] kmem_freepages+0xa0/0xf0 > [ 5060.135746] slab_destroy+0x19/0x50 > [ 5060.139577] slabs_destroy+0x6d/0x90 > [ 5060.143379] ___cache_free+0x4a3/0x6b0 > *****First recursion > [ 5060.147896] kfree+0xc9/0x1d0 > [ 5060.151082] kmem_freepages+0xa0/0xf0 > [ 5060.155121] slab_destroy+0x19/0x50 > [ 5060.159028] slabs_destroy+0x6d/0x90 > [ 5060.162920] ___cache_free+0x4a3/0x6b0 > [ 5060.167097] kfree+0xc9/0x1d0 > > ___cache_free() is calling cache_flusharray() to flush the local cpu > array_cache if the cache has more elements than the limit (ac->avail > >= ac->limit). > > cache_flusharray() is removing batchcount number of element from local > cpu array_cache and pass it slabs_destroy (if the node shared cache is > also full). > > Note that we have not updated local cpu array_cache size yet and > called slabs_destroy() which can call kfree() through > unaccount_slab_page(). > > We are on the same CPU and this recursive kfree again check the > (ac->avail >= ac->limit) and call cache_flusharray() again and recurse > indefinitely. I can see two possible fixes. We can either do async kfree of page_obj_cgroups(page) or we can update the local cpu array_cache's size before slabs_destroy(). Shakeel