Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3658517iog; Tue, 21 Jun 2022 03:21:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u4MmqT5K4M5tE43AqFz0IEjLpwV7ywF80KTVfvcVXk0/t4xa7MlD9OJ0tjwFSl6fQ72pJp X-Received: by 2002:aa7:c881:0:b0:435:5dc4:5832 with SMTP id p1-20020aa7c881000000b004355dc45832mr26525039eds.265.1655806879865; Tue, 21 Jun 2022 03:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655806879; cv=none; d=google.com; s=arc-20160816; b=Ifp8Yo1KfdufxRAUujwFEJL1v+Byxk1yhmYD7gd//Chh8QRtAioHVknH9qhz/+91nh 2tgdiJq0E4Xix6TogkhoZf6px+iS1sEHN4jUHGeUjBaZFCWvTzbeAVuZoVr0sGc4NJBM 8FFC88fi3xU8Gspu5PVsDyvZhfDoji0Bcx+2mF7ZNTjPRs+OdP+81kb1jksRPETUUdqb vAANKa5V37dTvumdRdYO+1inxq945eN5gIPeq3RsDePiFf04JGz/4kf/w5dYqexNstuC CAB+nTmiyoSchsqs83JWjocsE05p2uMc9haQlt5RXjoks+AAgxXMWyDXsVcJCaRiyG5w SEIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PUH52Z4onm5Tkw4f6oop1GRWD2PpqMFZxqzHdO+bULs=; b=ePjMfOL2aDANh1v60+iZCTj8UYcGHuzaz69DZ2gCxvuSg/Vd43mec2z9JZs95LImni AhLFkt3Y/ZQJcJ4Ng1r47wXaOBPSE2WkWDL4OV+k+1qIMe6nrLULADH69ysFCpf+1PaE HrUdjy4aeJpZJBbHNMWeDLor9AE0iiiFwjR9v8DYqS28fYgUV42B2ehNtC5cLFZsoxYO m/rvuqpNzNhKb+429VX4SJ6iIGAHXFZCYLVgdrFBT1eurLIcvK61btQLZwzo8izxDpqD tiJnLGoN/TEfw2HPG+fzJt6OuAP1Ih+fSlUqdNvE8WQXtVHzp3C8vy6eydWBjKFrLlR8 Su4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j32-20020a05640223a000b0043565bae501si12398885eda.210.2022.06.21.03.20.52; Tue, 21 Jun 2022 03:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347251AbiFUJVX (ORCPT + 99 others); Tue, 21 Jun 2022 05:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345332AbiFUJVW (ORCPT ); Tue, 21 Jun 2022 05:21:22 -0400 Received: from outbound-smtp20.blacknight.com (outbound-smtp20.blacknight.com [46.22.139.247]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22A401AF1A for ; Tue, 21 Jun 2022 02:21:20 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp20.blacknight.com (Postfix) with ESMTPS id A81641C4684 for ; Tue, 21 Jun 2022 10:21:18 +0100 (IST) Received: (qmail 19133 invoked from network); 21 Jun 2022 09:21:18 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 21 Jun 2022 09:21:18 -0000 Date: Tue, 21 Jun 2022 10:21:16 +0100 From: Mel Gorman To: Andrew Morton Cc: Marek Szyprowski , Yu Zhao , Nicolas Saenz Julienne , Marcelo Tosatti , Vlastimil Babka , Michal Hocko , Hugh Dickins , LKML , Linux-MM Subject: Re: [PATCH 7/7] mm/page_alloc: Replace local_lock with normal spinlock Message-ID: <20220621092116.GC15453@techsingularity.net> References: <20220613125622.18628-1-mgorman@techsingularity.net> <20220613125622.18628-8-mgorman@techsingularity.net> <20220615160446.be1f75fd256d67e57b27a9fc@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20220615160446.be1f75fd256d67e57b27a9fc@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 15, 2022 at 04:04:46PM -0700, Andrew Morton wrote: > On Thu, 16 Jun 2022 00:48:55 +0200 Marek Szyprowski wrote: > > > In the logs I see lots of errors like: > > > > BUG: sleeping function called from invalid context at > > ./include/linux/sched/mm.h:274 > > > > BUG: scheduling while atomic: systemd-udevd/288/0x00000002 > > > > BUG: sleeping function called from invalid context at mm/filemap.c:2647 > > > > however there are also a fatal ones like: > > > > Unable to handle kernel paging request at virtual address 00000000017a87b4 > > > > > > The issues seems to be a bit random. Looks like memory trashing. > > Reverting $subject on top of current linux-next fixes all those issues. > > > > > > This? > > --- a/mm/page_alloc.c~mm-page_alloc-replace-local_lock-with-normal-spinlock-fix > +++ a/mm/page_alloc.c > @@ -183,8 +183,10 @@ static DEFINE_MUTEX(pcp_batch_high_lock) > type *_ret; \ > pcpu_task_pin(); \ > _ret = this_cpu_ptr(ptr); \ > - if (!spin_trylock_irqsave(&_ret->member, flags)) \ > + if (!spin_trylock_irqsave(&_ret->member, flags)) { \ > + pcpu_task_unpin(); \ > _ret = NULL; \ > + } \ > _ret; \ > }) > This is the correct fix. I *had* a fix for this but in a patch that was not posted that drops irqsave :( -- Mel Gorman SUSE Labs