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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5053C43334 for ; Wed, 6 Jul 2022 14:53:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 28AC36B0073; Wed, 6 Jul 2022 10:53:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 23AAB6B0074; Wed, 6 Jul 2022 10:53:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 12AA56B0075; Wed, 6 Jul 2022 10:53:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 045C36B0073 for ; Wed, 6 Jul 2022 10:53:29 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C535D215E4 for ; Wed, 6 Jul 2022 14:53:28 +0000 (UTC) X-FDA: 79656968496.13.9DEC435 Received: from outbound-smtp63.blacknight.com (outbound-smtp63.blacknight.com [46.22.136.252]) by imf07.hostedemail.com (Postfix) with ESMTP id 276AA40016 for ; Wed, 6 Jul 2022 14:53:27 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp63.blacknight.com (Postfix) with ESMTPS id AFE24FAC6B for ; Wed, 6 Jul 2022 15:53:26 +0100 (IST) Received: (qmail 22138 invoked from network); 6 Jul 2022 14:53:26 -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); 6 Jul 2022 14:53:26 -0000 Date: Wed, 6 Jul 2022 15:53:24 +0100 From: Mel Gorman To: Oliver Sang Cc: Andrew Morton , 0day robot , LKML , linux-mm@kvack.org, lkp@lists.01.org, Nicolas Saenz Julienne , Marcelo Tosatti , Vlastimil Babka , Michal Hocko , Hugh Dickins Subject: Re: [mm/page_alloc] 2bd8eec68f: BUG:sleeping_function_called_from_invalid_context_at_mm/gup.c Message-ID: <20220706145324.GH27531@techsingularity.net> References: <20220613125622.18628-8-mgorman@techsingularity.net> <20220703132209.875b823d1cb7169a8d51d56d@linux-foundation.org> <20220706095535.GD27531@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657119208; a=rsa-sha256; cv=none; b=wskAxUqCW2XhwoNpW4p0rymwkScU1+cdBHgBcU2xDK1lJoomME2YdsMNGY2RM1PXplCFE3 MvxOSjHIb1EyLdBA2jljagW1hFdMmA0nKJlkPTWRUllUaVyAHVPGfAapOGzk2mH65pYEhC PABFN4RbujvSmKcfZUi9maCdhBgKLL8= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.252 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657119208; h=from:from:sender: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: in-reply-to:in-reply-to:references:references; bh=Q0zGV9Dk0uFAOHhb35k9OJOFivr7ocnuHKIti8LsRyY=; b=RUcrJbYM1V04FT7AbHDHymnqC+Ndm/9GhfhhU4fDoNY716vcgStK/AX/Yzw9aP+wt8ae5A 8fVvobswfAXxfonNZ4zI4T/vccEQblrlJZRgDnoKr/ZW4gLR7fTQY6tphH0nnGC3CaWLIq YE9FHWESsj/nxvD826eSHMhstpdCBaI= Authentication-Results: imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.252 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: kxjftzwicp8wxgwjrhsgtf8r9gaupuzm X-Rspamd-Queue-Id: 276AA40016 X-HE-Tag: 1657119207-617566 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 Wed, Jul 06, 2022 at 10:25:30PM +0800, Oliver Sang wrote: > hi, Mel Gorman, > > On Wed, Jul 06, 2022 at 10:55:35AM +0100, Mel Gorman wrote: > > On Tue, Jul 05, 2022 at 09:51:25PM +0800, Oliver Sang wrote: > > > Hi Andrew Morton, > > > > > > On Sun, Jul 03, 2022 at 01:22:09PM -0700, Andrew Morton wrote: > > > > On Sun, 3 Jul 2022 17:44:30 +0800 kernel test robot wrote: > > > > > > > > > FYI, we noticed the following commit (built with gcc-11): > > > > > > > > > > commit: 2bd8eec68f740608db5ea58ecff06965228764cb ("[PATCH 7/7] mm/page_alloc: Replace local_lock with normal spinlock") > > > > > url: https://github.com/intel-lab-lkp/linux/commits/Mel-Gorman/Drain-remote-per-cpu-directly/20220613-230139 > > > > > base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3 > > > > > patch link: https://lore.kernel.org/lkml/20220613125622.18628-8-mgorman@techsingularity.net > > > > > > > > > > > > > Did this test include the followup patch > > > > mm-page_alloc-replace-local_lock-with-normal-spinlock-fix.patch? > > > > > > no, we just fetched original patch set and test upon it. > > > > > > now we applied the patch you pointed to us upon 2bd8eec68f and found the issue > > > still exist. > > > (attached dmesg FYI) > > > > > > > Thanks Oliver. > > > > The trace is odd in that it hits in GUP when the page allocator is no > > longer active and the context is a syscall. First, is this definitely > > the first patch the problem occurs? > > > > Second, it's possible for IRQs to be enabled and an IRQ delivered before > > preemption is enabled. It's not clear why that would be a problem other > > than lacking symmetry or how it could result in the reported BUG but > > might as well rule it out. This is build tested only > > do you want us test below patch? > if so, should we apply it upon the patch > "mm/page_alloc: Replace local_lock with normal spinlock" > or > "mm/page_alloc: replace local_lock with normal spinlock -fix"? > On top of "mm/page_alloc: replace local_lock with normal spinlock -fix" please. The -fix patch is cosmetic but it'd still be better to test on top. Thanks! -- Mel Gorman SUSE Labs