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 X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71062C48BCD for ; Wed, 9 Jun 2021 11:39:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1F156613CB for ; Wed, 9 Jun 2021 11:39:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F156613CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BC9076B0036; Wed, 9 Jun 2021 07:39:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 996216B0070; Wed, 9 Jun 2021 07:39:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 773FD6B0074; Wed, 9 Jun 2021 07:39:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 3BEE56B006E for ; Wed, 9 Jun 2021 07:39:34 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CBC05B9E8 for ; Wed, 9 Jun 2021 11:39:33 +0000 (UTC) X-FDA: 78233990226.22.E63E3E5 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf29.hostedemail.com (Postfix) with ESMTP id 8048F54D for ; Wed, 9 Jun 2021 11:39:27 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4CD57219DC; Wed, 9 Jun 2021 11:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623238772; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zoOHiL7Kvc+iNuZbvKQCtrRD3qZokJ4ArXlEsxyEuKw=; b=UJ0symXRAnt3IWMogw5ez7B8HoZD9xhnBulyzyFv4vHSMLWvwXCmlmOeEYQ8RSFLUIoh3Q yhq5azcwdMvLlfV1T6WsE9P1fc22ViVWkrx0oWQvDRtJw5mVzm4HbTBGkZqgOKY2T3ZS1s aSxcv8e0eSuEt8bhe5Uts2TkKx4od+k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623238772; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zoOHiL7Kvc+iNuZbvKQCtrRD3qZokJ4ArXlEsxyEuKw=; b=NdAvi3bIF8OZl40iBlJF/XsvpwTRCUi1nP6B0ZSa0AjDiEltwOlRwE+ie1ErbtF8dL8fuG dfIrpcGEbKUPk8DQ== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 1EBEF118DD; Wed, 9 Jun 2021 11:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623238772; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zoOHiL7Kvc+iNuZbvKQCtrRD3qZokJ4ArXlEsxyEuKw=; b=UJ0symXRAnt3IWMogw5ez7B8HoZD9xhnBulyzyFv4vHSMLWvwXCmlmOeEYQ8RSFLUIoh3Q yhq5azcwdMvLlfV1T6WsE9P1fc22ViVWkrx0oWQvDRtJw5mVzm4HbTBGkZqgOKY2T3ZS1s aSxcv8e0eSuEt8bhe5Uts2TkKx4od+k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623238772; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zoOHiL7Kvc+iNuZbvKQCtrRD3qZokJ4ArXlEsxyEuKw=; b=NdAvi3bIF8OZl40iBlJF/XsvpwTRCUi1nP6B0ZSa0AjDiEltwOlRwE+ie1ErbtF8dL8fuG dfIrpcGEbKUPk8DQ== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id wJwKB3SowGD6XgAALh3uQQ (envelope-from ); Wed, 09 Jun 2021 11:39:32 +0000 From: Vlastimil Babka To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim Cc: Sebastian Andrzej Siewior , Thomas Gleixner , Mel Gorman , Jesper Dangaard Brouer , Peter Zijlstra , Jann Horn , Vlastimil Babka Subject: [RFC v2 04/34] mm, slub: don't disable irq for debug_check_no_locks_freed() Date: Wed, 9 Jun 2021 13:38:33 +0200 Message-Id: <20210609113903.1421-5-vbabka@suse.cz> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210609113903.1421-1-vbabka@suse.cz> References: <20210609113903.1421-1-vbabka@suse.cz> MIME-Version: 1.0 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=UJ0symXR; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=NdAvi3bI; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=UJ0symXR; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=NdAvi3bI; dmarc=none; spf=pass (imf29.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspam02 X-Stat-Signature: d8tw1jixm3a3b8ygep157dky44drccyt X-Rspamd-Queue-Id: 8048F54D X-HE-Tag: 1623238767-46021 Content-Transfer-Encoding: quoted-printable 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: In slab_free_hook() we disable irqs around the debug_check_no_locks_freed= () call, which is unnecessary, as irqs are already being disabled inside the= call. This seems to be leftover from the past where there were more calls insid= e the irq disabled sections. Remove the irq disable/enable operations. Mel noted: > Looks like it was needed for kmemcheck which went away back in 4.15 Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman --- mm/slub.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 5a940bd3cebb..2953f6e43cae 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1545,20 +1545,8 @@ static __always_inline bool slab_free_hook(struct = kmem_cache *s, { kmemleak_free_recursive(x, s->flags); =20 - /* - * Trouble is that we may no longer disable interrupts in the fast path - * So in order to make the debug calls that expect irqs to be - * disabled we need to disable interrupts temporarily. - */ -#ifdef CONFIG_LOCKDEP - { - unsigned long flags; + debug_check_no_locks_freed(x, s->object_size); =20 - local_irq_save(flags); - debug_check_no_locks_freed(x, s->object_size); - local_irq_restore(flags); - } -#endif if (!(s->flags & SLAB_DEBUG_OBJECTS)) debug_check_no_obj_freed(x, s->object_size); =20 --=20 2.31.1