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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 77D4CC47082 for ; Tue, 8 Jun 2021 12:13:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A5166124C for ; Tue, 8 Jun 2021 12:13:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232256AbhFHMPT (ORCPT ); Tue, 8 Jun 2021 08:15:19 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:40510 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231330AbhFHMPO (ORCPT ); Tue, 8 Jun 2021 08:15:14 -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-out2.suse.de (Postfix) with ESMTPS id 3D3A11FD33; Tue, 8 Jun 2021 12:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623154401; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Y/J8Oxrbxf7pNOjDNnn6LhqTrUOzD1NlEUvEz7T1EU=; b=WKp/nPQBucPBdqYMkfXdmyAEV4Arhcf8JqYAVzOIStxlfQG+g1jnipSb5vn+bewNdJv6pn 8RmKQk7/Z56uHr43nYwV6zU0fKENB7CzDnW3ii1QyugjYlFLzIo3AaqS6EOtFOHaKRNAh2 CYNVlkcqrAAqkYaDN3p4OyMNVx5lujU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623154401; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Y/J8Oxrbxf7pNOjDNnn6LhqTrUOzD1NlEUvEz7T1EU=; b=IO5xwWfhc9uWRABkXSIIcIhOP/BND3iIXz9Yt7yH3INYf08+mTI/LY7eGvIMJStptpLbu/ +Y7cTQDKZD99OkBw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 177F7118DD; Tue, 8 Jun 2021 12:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623154401; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Y/J8Oxrbxf7pNOjDNnn6LhqTrUOzD1NlEUvEz7T1EU=; b=WKp/nPQBucPBdqYMkfXdmyAEV4Arhcf8JqYAVzOIStxlfQG+g1jnipSb5vn+bewNdJv6pn 8RmKQk7/Z56uHr43nYwV6zU0fKENB7CzDnW3ii1QyugjYlFLzIo3AaqS6EOtFOHaKRNAh2 CYNVlkcqrAAqkYaDN3p4OyMNVx5lujU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623154401; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Y/J8Oxrbxf7pNOjDNnn6LhqTrUOzD1NlEUvEz7T1EU=; b=IO5xwWfhc9uWRABkXSIIcIhOP/BND3iIXz9Yt7yH3INYf08+mTI/LY7eGvIMJStptpLbu/ +Y7cTQDKZD99OkBw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id L4AtBeFev2AmPAAALh3uQQ (envelope-from ); Tue, 08 Jun 2021 12:13:21 +0000 Subject: Re: [RFC 10/26] mm, slub: do initial checks in ___slab_alloc() with irqs enabled To: Mel Gorman Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim , Sebastian Andrzej Siewior , Thomas Gleixner , Jesper Dangaard Brouer , Peter Zijlstra , Jann Horn References: <20210524233946.20352-1-vbabka@suse.cz> <20210524233946.20352-11-vbabka@suse.cz> <20210525130436.GS30378@techsingularity.net> From: Vlastimil Babka Message-ID: Date: Tue, 8 Jun 2021 14:13:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210525130436.GS30378@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/25/21 3:04 PM, Mel Gorman wrote: > On Tue, May 25, 2021 at 01:39:30AM +0200, Vlastimil Babka wrote: >> As another step of shortening irq disabled sections in ___slab_alloc(), don't >> disable irqs until doing initial checks if there is a cached percpu slab and >> it's suitable for our allocation. >> >> Now we have to recheck c->page after actually disabling irqs as an allocation >> in irq might have replaced it. >> >> Signed-off-by: Vlastimil Babka > > Minor nit only -- consider adding a comment at the new_slab label that > IRQs must be disabled already. Good point, will use lockdep_assert_irqs_disabled() as that's a functional comment. > Acked-by: Mel Gorman Thanks.