Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp962079lqb; Wed, 17 Apr 2024 16:46:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRI50hCK3axp9Tjw3atD/S5iZyqjJh5jcYbfEXvklR6Y1c2jd9sScFNR1SKRyAfAJ4hUDAhkwmxv5Uv07CU/b/cqSfDSXlQ57JIwSAdQ== X-Google-Smtp-Source: AGHT+IFQHNp4bMTxR89blagAxTJbhIM9IBYgSlV/wxFMtf6FS3ey4ancAoSBQiqutZPqV09QFtvz X-Received: by 2002:ac8:5709:0:b0:437:8cc4:77f6 with SMTP id 9-20020ac85709000000b004378cc477f6mr1240797qtw.53.1713397611026; Wed, 17 Apr 2024 16:46:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713397611; cv=pass; d=google.com; s=arc-20160816; b=aGTB9upLfPkJJ13Xs0xmyT2c+FvS/87zsCL5anFX3B3P6Gq0/fjs5MjD64NHQhJU17 5cOGAbCZa3sK3vJK8IHzZ5lfHcU8N5N1jDMN6CNNHRZZ6qBYqXdJxe252r+WIaI9XUc6 uNoJyAuwAc7g07fY9O5DEG7CEvUIpUO4xVNi3mB9KQ9gPRquosOINwoeL3Pnqe99ria6 BHcNTVZW0EHKlL4778KUjSiOdozYPhWIKj/hEJb9ECQKmQ/YEpW3u4APgoZLr16LSLQ6 BVQ9R9klRhtUe0T+HuXUfcZL4JWqHUW2S4eG0RbBa/WUDZT31/17UgzCJQzt7C0kYbGy jisQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GZu6N4Ih5Zf7eZjzMh2GB1Dsou/X46+ClOTdb83epCo=; fh=vel3Mb3V2Q9PgQLOgRkbDrMM7jfZ+kdEgqa86yBxl2c=; b=euBR5U4ageI4GVYVsHMwrDu6oVqYC2a3kkoMUJK0T9ZxkP0FsCpzayiOmPvfV9GNhv fUVYxxGmdnLU1hcjd1CVfK/UmgWPOYhSNTex4zSJGmjxJtrrRCivb+86KLj5SgRL5BtR OT3CVh6LJmaJ1SdFQnuLQp22jyXFq7lIRKn+Zt1awXLgmJmyXNIJKT8KNdKxfBsQ93yR 3Pe56pf/eIDbafnFjA7vNlqOR8XikhAJg9oJ2/AqNzDvD+i0COFRU5JGgajRoliYBs/r Bge2YGW+NW6tHe5Ct/Lng0Prep1Q5Tbnxg0Ank7XnEbOYPCdEx6vNnXTZpbbOhWLCIs8 wpIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=D2a30PBp; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-149328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149328-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q18-20020a05622a04d200b0043643ac6052si303792qtx.215.2024.04.17.16.46.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 16:46:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=D2a30PBp; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-149328-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149328-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BBB4B1C20E1B for ; Wed, 17 Apr 2024 23:46:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B2E3128811; Wed, 17 Apr 2024 23:46:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="D2a30PBp" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D6B085C62 for ; Wed, 17 Apr 2024 23:46:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713397604; cv=none; b=gDtkPNyPOD7g4dH9lkaSO2i3psRLdvOBsnrtYeab6dMM/DhWGKt/5G9iTvtvp3YCppdSV6HW1bUOH3Ag5+TQ5Lnl980w4inRWyt6B7xvxw1g0eHblgO4rYvKr3iNqOHBxIqTSUteBRlIgzJt/Gi0KxVkg049vWihmMT8DHIBzg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713397604; c=relaxed/simple; bh=h7rOwEih/ucDsKKl7fIUQANiya1peySLfSOCWewfqbc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F1Gk9oqWNyvmO9Rg58IFg1xIy8+k03BK+wOA4x7Dk321unsTs7ePU399zpPgPb3E+ZTG1EH7F15VqbHy5VsHANfRyUnXviNPImG38y26gzWCcFYrdllOCt2Nmn9yIaihZqMksKAw+xe5gWt2kDR6QGby/l27peVmlG5UD1H/vQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=D2a30PBp; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=GZu6N4Ih5Zf7eZjzMh2GB1Dsou/X46+ClOTdb83epCo=; b=D2a30PBpa9rj4n1CfscbGjxtKt kntJY7McTn7wXqkSxV1gU9iu3JqahGQvflzCONtbu7LFqk4O6+0nEYsoda8wqPCnaCRs06yYYdxrr mgVDLovCE/VqS3AWNbx3s0wk8KXks7R8XHR9i0kngDIbYDY89VaUMCmw4WaCKRzahFiCLf+/OUEoe WAI4Kq+XnQ2Kf34Ww+Z4umeLlPw2y8djEwoK3RYElHZ3D1j/Ur1h1exCuxkGsyb7MO5Dl9iTYOz7d qbtGaaKQI5rmROAMJ3axZ3acB+x7xY29hrY+gTLD7G+aBT5901DbFJqoULdwkRkp3T8IGYvzTc8xM tGO96a4w==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxEz9-000000043XQ-0vlJ; Wed, 17 Apr 2024 23:46:39 +0000 Date: Thu, 18 Apr 2024 00:46:39 +0100 From: Matthew Wilcox To: Peter Xu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Hildenbrand , Mina Almasry , Andrew Morton , Muchun Song , David Rientjes Subject: Re: [PATCH 1/3] fixup! mm: always initialise folio->_deferred_list Message-ID: References: <20240417211836.2742593-1-peterx@redhat.com> <20240417211836.2742593-2-peterx@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240417211836.2742593-2-peterx@redhat.com> On Wed, Apr 17, 2024 at 05:18:34PM -0400, Peter Xu wrote: > Current mm-unstable will hit this when running test_hugetlb_memcg. This > fixes the crash for me. > > Signed-off-by: Peter Xu > --- > mm/memcontrol.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 1840ba4c355d..7703ced535a3 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -7529,6 +7529,7 @@ static void uncharge_folio(struct folio *folio, struct uncharge_gather *ug) > > VM_BUG_ON_FOLIO(folio_test_lru(folio), folio); > VM_BUG_ON_FOLIO(folio_order(folio) > 1 && > + !folio_test_hugetlb(folio) && > !list_empty(&folio->_deferred_list), folio); Hum. I thought we didn't get here for hugetlb folios. What stacktrace did you get? I'm basing it on comments like this: /* hugetlb has its own memcg */ if (folio_test_hugetlb(folio)) { if (lruvec) { unlock_page_lruvec_irqrestore(lruvec, flags); lruvec = NULL; } free_huge_folio(folio); continue; }