Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5683517pxb; Mon, 14 Feb 2022 05:16:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4yt5s8wqd4qTB/TEfx0r8sI7HEAXCPr5kY9anTZZKoQfkMGDf/U2rvZEF+WEu6zNdXnzH X-Received: by 2002:a62:fb19:: with SMTP id x25mr14400345pfm.58.1644844598477; Mon, 14 Feb 2022 05:16:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644844598; cv=none; d=google.com; s=arc-20160816; b=I97e7VYTDy2FB+z2XaFVstlkKilGi3JxXfeNkhEIffEjBYXeBldiiyVxZ8ue5HPgwF l01U6mgc6DTHLUtdqfsunBxYe4ZsclwjLO7wut9y+QJnNwOCFrcDOIJ+1Ez2yPTPakiG g4oqCpdATG/auKyeGD2qMMXPiJuGR6V9GECEbxbmjL9tGCUwcOKaLRQxquRp4VDxXRAm R2pl5lwEIHmyKKjcJRrdEY1+bRO0xfOj9gSfa1hoRQdA6Az+CINye4S/+Xg5gRNfT6qd FpNIzaJh9DI3tB5+2vM4DVxN2duGqZOgwDhMcIiPmybi0sXiejJeB1Jpy0Gx/2XrSxSE q8vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=h9lgENlLH+E/IJinaeOP1R7M6s/XOyGy5yYBeg0uvqY=; b=ynA94UcfOVxhQ/in9FpbxjcDScQcE72b+m/GQ4jiK4xBYibB9YgW5Om03/gZaARB9u Ks0oCcQKK+qCCReHxFcXSaClq0kjaxRXzld/6/9cLNl8ZBLqnPVjfOJzHQMlbEEyDBOs Up6uMgt2tRU4HDm8uzd6b5h6CNnmBP2HL5BaUFR1i302mweDnhVeGGo5ASLpMzCC1tRl 1kZEsAGqGrEadJV0acy/XM/jY/Ko1HB4udmjnZjEgDhzLxpudoeK9U/RYfKyd2ebL9k/ Jtr/i5sNvnhW5ZS1bPsmo4B5TDzpfa3ocM9hc6hif/KF7XQLNWXJC1KJamAq2yDjENqY CcCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uPISaPZ7; 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 w64si4317932pff.366.2022.02.14.05.16.24; Mon, 14 Feb 2022 05:16:38 -0800 (PST) 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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uPISaPZ7; 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 S233351AbiBMEKO (ORCPT + 99 others); Sat, 12 Feb 2022 23:10:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232021AbiBMEKN (ORCPT ); Sat, 12 Feb 2022 23:10:13 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 018705F27D; Sat, 12 Feb 2022 20:10:07 -0800 (PST) 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=h9lgENlLH+E/IJinaeOP1R7M6s/XOyGy5yYBeg0uvqY=; b=uPISaPZ7NAppRwSbiaADv/BNro v+g5aXjZoUIzbeS68b6zBoMjLRFFI9GYaUH290Pscue04bqDB8K9ppiB2pIqclLYq/IIX2LZNaCYT 6718HT1Cv0ujzzrEhL2Jz4/YV/wdaER713UmY4KGY7KzG7ecUnK0qOXa4NA5ycSiiYtbyW4F/KKsD 3fcu3zxxxvmqUBrx9MMqt1q3Mb2NS0w4+3aXK9C3l8eZr9Fpw4wE9zA4w694SkUFvenPGag3z6jis jHYpVc2Eo54+xnMlgVzCtVaZCqJiJnNxE2eynAN1VY2hgWRHkBi6dpEhlIphmLIkAughbtTIQhMZC bbzEka5Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJ6CW-00Blhs-Gg; Sun, 13 Feb 2022 04:09:28 +0000 Date: Sun, 13 Feb 2022 04:09:28 +0000 From: Matthew Wilcox To: Zhouyi Zhou Cc: Paul Menzel , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Linux-MM , Peter Zijlstra , Josh Poimboeuf , Jason Baron , rcu , LKML , "Paul E. McKenney" Subject: Re: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:256 Message-ID: References: <244218af-df6a-236e-0a52-268247dd8271@molgen.mpg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 Sun, Feb 13, 2022 at 11:19:09AM +0800, Zhouyi Zhou wrote: > I think the key to the problem lies in your attached console.log > (pasted below), at times 0.014987 and 0.015995, I see there are two > locks (cpu_hotplug_lock and jump_label_mutex) holded while > kmem_cache_alloc calls __might_resched (0.023356). Those are both sleeping locks (a percpu_rwsem and mutex, respectively). There is no problem with sleeping while holding a mutex or rwsem.