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 01972C433F5 for ; Sun, 13 Feb 2022 04:09:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 514E16B0072; Sat, 12 Feb 2022 23:09:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 49B806B0073; Sat, 12 Feb 2022 23:09:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 316696B0078; Sat, 12 Feb 2022 23:09:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id 198BD6B0072 for ; Sat, 12 Feb 2022 23:09:56 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CACD1180ACF84 for ; Sun, 13 Feb 2022 04:09:55 +0000 (UTC) X-FDA: 79136428350.25.6A79B5E Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf25.hostedemail.com (Postfix) with ESMTP id E3E7EA0002 for ; Sun, 13 Feb 2022 04:09:54 +0000 (UTC) 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: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=uPISaPZ7; dmarc=none; spf=none (imf25.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E3E7EA0002 X-Stat-Signature: 77xhzd88nefd6js6eqez73y699ismjo5 X-HE-Tag: 1644725394-293630 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 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.