Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp912865pxf; Wed, 7 Apr 2021 14:54:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvJsPvL4jggWsABvoHuRz+SV3kUW8sWSTWH0Bzwegb9vNAeV53ehEnaq3b/pWTpX0NE6e4 X-Received: by 2002:a17:90a:4290:: with SMTP id p16mr5267464pjg.120.1617832497095; Wed, 07 Apr 2021 14:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617832497; cv=none; d=google.com; s=arc-20160816; b=CvKAOLZ/ZXfG3gfXBZzn9N1YKakG1BEVY8+60oqGIYtpM22k/3oVQAgpzO3zKgeUZk MJ3TV2wwPr8+DW7WYqiK1H2IZhD/HaQYdepHB04DGhb3BJmgGbaXMET4ki/iEhj51b27 u0CMx455aHD8nEKg3/wYlY04P7sYlE6bPHLgmUfhJ1G1pQu+aXCowg3Xo85J1vlm9P/k 2PRlLSh0VNKcok7K3l3Qt3FBh/BFn7Bp1msl+bHxEJgIKrDW7z9ZFhNB3SkxvX/JlQqZ xtUL3w/4oyDe7OnQmTPig9OQ6SwHAmyYTTje87sC8nMBe9a9jSjwQcqAKH+sdPH3Z51y IkTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=nICXy0OcOY4Al/C6SJOOM/Ag0J2VOwHjSfKwKAmEoNQ=; b=GVQX4Xr8NvJJ6Wsn1thjlQUYHhofiunDE3e4lyvzhbi2e2iyt7sGeSId8ZtGKFPf9P Wn1O5ZEe9P4Ih7oKUJ5BlYxSB+eTxODA4AxPvoLIca6Z13tZi9rIkDqmVl+2YHSMpDM6 ZFOpUtcCbIhT4bk+ToeH4BrC6e5gait8Ks9Hd8DMpOaTWPHv236nmdNzSguXMByE99aV rXikAbUfo6//aF6xOVXgu01tUJTV9Hua7H/+DHERF+Py6D4ui9PmnI1VMIi496lp6XEL J9vho2FvG4JaN6j8Wq1fYEIMxDe0Xkf5vHUNoAH1UXKkCmy2RayKFv1o4JZ08INrP30+ GVAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bWoFf+sK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si7253044pfv.271.2021.04.07.14.54.45; Wed, 07 Apr 2021 14:54:57 -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=@kernel.org header.s=k20201202 header.b=bWoFf+sK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355414AbhDGSss (ORCPT + 99 others); Wed, 7 Apr 2021 14:48:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:38498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355406AbhDGSsq (ORCPT ); Wed, 7 Apr 2021 14:48:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0443961245; Wed, 7 Apr 2021 18:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617821316; bh=/uEboQWa0N23boTspbR+ct5lTQeEVJSbhuaoJrqyxI0=; h=From:To:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=bWoFf+sKVq4IhgvNGVDUPUB8fa2vJzur0j9p5omzAJ+pJllcYZHpXcuDUybz9yF6X BachtVlWwmh2UK6AR3R8USbtq5JYI+NYisqFPiJ6U5Uza4nU7yH4ntN7yJHbnROqw3 lfswXmLxQQzXEbUJwkg/zJqwJzNs7ycoHjIBKomWv5c+KwvI0UKByxAiYNuKuqiDor cl2jSBR7nOht/GvzeS6JoJKmc6hq7wLFdIda4mPThrJ8PnvnEUCzdZ2zVvivCJW5S/ K9Gfl05QAunBH7iwgHrVkZwU5i7LVzaemDtVmmJa2CF3EdEE6BFSJlKQ6jT0uHdrp3 4GvCIfPe58+UA== From: zanussi@kernel.org To: LKML , linux-rt-users , Steven Rostedt , Thomas Gleixner , Carsten Emde , John Kacur , Sebastian Andrzej Siewior , Daniel Wagner , Clark Williams , "Luis Claudio R. Goncalves" , Tom Zanussi Subject: [PATCH RT 1/2] mm: slub: Don't resize the location tracking cache on PREEMPT_RT Date: Wed, 7 Apr 2021 13:48:32 -0500 Message-Id: <53a3ad9181bcdb62d4be6d521d6aeb490eb77e7f.1617821301.git.zanussi@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sebastian Andrzej Siewior v5.4.109-rt56-rc1 stable review patch. If anyone has any objections, please let me know. ----------- [ Upstream commit 87bd0bf324f4c5468ea3d1de0482589f491f3145 ] The location tracking cache has a size of a page and is resized if its current size is too small. This allocation happens with disabled interrupts and can't happen on PREEMPT_RT. Should one page be too small, then we have to allocate more at the beginning. The only downside is that less callers will be visible. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Tom Zanussi --- mm/slub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index 1815e28852fe..0d78368d149a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4647,6 +4647,9 @@ static int alloc_loc_track(struct loc_track *t, unsigned long max, gfp_t flags) struct location *l; int order; + if (IS_ENABLED(CONFIG_PREEMPT_RT) && flags == GFP_ATOMIC) + return 0; + order = get_order(sizeof(struct location) * max); l = (void *)__get_free_pages(flags, order); -- 2.17.1