Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5153651pxj; Wed, 9 Jun 2021 10:19:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1lJImpIghld+16+4b6Rf2UyWErQUozWGDqxYxrVBYroWSr2W+yHU9jxWXVSeUl4ZfWjpK X-Received: by 2002:aa7:d78d:: with SMTP id s13mr518802edq.208.1623259176375; Wed, 09 Jun 2021 10:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623259176; cv=none; d=google.com; s=arc-20160816; b=dWOQAa5E1P0uZ4YliVPMUqWG5rsV/QlKNyp811HGmz5QP5SRB5V0MwAsJfl+rJ/aV1 /ZOe/E05qgYevrcle5dmYE/LhzPX1bgnMvfuc5WCQgse1anAVwwzG4TNMc0GCIpoHyos 0uCYQnNXsjK3a7E6kDyKYC4NljuNfsvZfnAxkaLp1i6Aofe03jAvR6wvpgJNdoLw8/OG ukddq0KHok0CK1fwv90x02dyZ77LILaiNXUkwElDUFt9mkmd+vIB4g9fC0nB7AFH+Cin JBppqpIfwq247HGwDcOhMLcVW23cSBsS4+PSLEUijxFY1yFuZmBFSIdUXy5yDtWM0rz2 ODmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=zoOHiL7Kvc+iNuZbvKQCtrRD3qZokJ4ArXlEsxyEuKw=; b=dfEu4v7Zw7dJ2xkuNIM3xPe4hybyT5L6RWFSEeQpP0W/pYn3SMIfzjBInRYfnNBYUV LLLHyVJsd2uOmqBj6bmP4Hyfh5sJwIePxPu9zTfFfgQZWYWWQEo5B/YT7dDT5ItEtRJI 9wb5SHpPMWP3YvBVl6w2bXE5DOAcMIcfMScrxODN7iAOg167lwZPL2sWnthbm7KrcBWE ZpuNML0fPJoXSrOSb+W1LkoNk6kZyagmxn4PSuXTmuzwDBIAjOy2TT9pl8rTrGEyV9/I v895lRrUJehJIHz/Qw98xDZyNG7K+5HV7q4ikPJjgiQG4uJSN30OtBLSynugBiAXv41R ALFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=UJ0symXR; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=UJ0symXR; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=NdAvi3bI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si205520edr.526.2021.06.09.10.19.12; Wed, 09 Jun 2021 10:19:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=UJ0symXR; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=UJ0symXR; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=NdAvi3bI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239215AbhFILlk (ORCPT + 99 others); Wed, 9 Jun 2021 07:41:40 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:54614 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239031AbhFILl1 (ORCPT ); Wed, 9 Jun 2021 07:41:27 -0400 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 inside 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); - /* - * 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); - 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); -- 2.31.1