From patchwork Sun Dec 8 14:58:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thermal-bot for Stanislaw Gruszka X-Patchwork-Id: 11278153 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6C3D109A for ; Sun, 8 Dec 2019 14:58:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 78B8220700 for ; Sun, 8 Dec 2019 14:58:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78B8220700 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7163E6B219D; Sun, 8 Dec 2019 09:58:38 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6C6A86B219E; Sun, 8 Dec 2019 09:58:38 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5DD666B219F; Sun, 8 Dec 2019 09:58:38 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 480F46B219D for ; Sun, 8 Dec 2019 09:58:38 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id F3F598249980 for ; Sun, 8 Dec 2019 14:58:37 +0000 (UTC) X-FDA: 76242280716.10.rock99_111611d927713 X-Spam-Summary: 2,0,0,7b4d404398e30ade,d41d8cd98f00b204,tip-bot2@linutronix.de,:linux-tip-commits@vger.kernel.org:tglx@linutronix.de:bigeasy@linutronix.de:cl@linux.com:akpm@linux-foundation.org:rientjes@google.com:iamjoonsoo.kim@lge.com:torvalds@linux-foundation.org:penberg@kernel.org:peterz@infradead.org::mingo@kernel.org:x86@kernel.org:linux-kernel@vger.kernel.org,RULES_HIT:41:152:355:379:541:800:904:960:967:973:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1535:1543:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2559:2564:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3165:3355:3865:3866:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4605:5007:6119:6742:7652:7903:8784:8957:9025:10004:10400:11026:11473:11658:11914:12043:12050:12160:12296:12438:12517:12519:12555:12679:12740:12760:12895:12986:13161:13229:13846:13870:14096:14097:14181:14721:21080:21365:21451:2161 1:21627: X-HE-Tag: rock99_111611d927713 X-Filterd-Recvd-Size: 5936 Received: from Galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Sun, 8 Dec 2019 14:58:37 +0000 (UTC) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1idy10-0000Qy-S7; Sun, 08 Dec 2019 15:58:31 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 860111C2887; Sun, 8 Dec 2019 15:58:30 +0100 (CET) Date: Sun, 08 Dec 2019 14:58:30 -0000 From: "tip-bot2 for Thomas Gleixner" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/rt, mm: Use CONFIG_PREEMPTION Cc: Thomas Gleixner , Sebastian Andrzej Siewior , Chistoph Lameter , Andrew Morton , David Rientjes , Joonsoo Kim , Linus Torvalds , Pekka Enberg , Peter Zijlstra , linux-mm@kvack.org, Ingo Molnar , x86 , LKML In-Reply-To: <20191015191821.11479-26-bigeasy@linutronix.de> References: <20191015191821.11479-26-bigeasy@linutronix.de> MIME-Version: 1.0 Message-ID: <157581711044.21853.1629437364165530874.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 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: The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 923717cbab900fb23b31f16fb31b1d86b09bf702 Gitweb: https://git.kernel.org/tip/923717cbab900fb23b31f16fb31b1d86b09bf702 Author: Thomas Gleixner AuthorDate: Tue, 15 Oct 2019 21:18:12 +02:00 Committer: Ingo Molnar CommitterDate: Sun, 08 Dec 2019 14:37:36 +01:00 sched/rt, mm: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the pte_unmap_same() and SLUB code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Chistoph Lameter Cc: Andrew Morton Cc: David Rientjes Cc: Joonsoo Kim Cc: Linus Torvalds Cc: Pekka Enberg Cc: Peter Zijlstra Cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20191015191821.11479-26-bigeasy@linutronix.de Signed-off-by: Ingo Molnar --- mm/memory.c | 2 +- mm/slub.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 513c3ec..d56883c 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2151,7 +2151,7 @@ static inline int pte_unmap_same(struct mm_struct *mm, pmd_t *pmd, pte_t *page_table, pte_t orig_pte) { int same = 1; -#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) +#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPTION) if (sizeof(pte_t) > sizeof(unsigned long)) { spinlock_t *ptl = pte_lockptr(mm, pmd); spin_lock(ptl); diff --git a/mm/slub.c b/mm/slub.c index d113897..f7c66dc 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1964,7 +1964,7 @@ static void *get_partial(struct kmem_cache *s, gfp_t flags, int node, return get_any_partial(s, flags, c); } -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPTION /* * Calculate the next globally unique transaction for disambiguiation * during cmpxchg. The transactions start with the cpu number and are then @@ -2009,7 +2009,7 @@ static inline void note_cmpxchg_failure(const char *n, pr_info("%s %s: cmpxchg redo ", n, s->name); -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPTION if (tid_to_cpu(tid) != tid_to_cpu(actual_tid)) pr_warn("due to cpu change %d -> %d\n", tid_to_cpu(tid), tid_to_cpu(actual_tid)); @@ -2637,7 +2637,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, unsigned long flags; local_irq_save(flags); -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPTION /* * We may have been preempted and rescheduled on a different * cpu before disabling interrupts. Need to reload cpu area @@ -2691,13 +2691,13 @@ redo: * as we end up on the original cpu again when doing the cmpxchg. * * We should guarantee that tid and kmem_cache are retrieved on - * the same cpu. It could be different if CONFIG_PREEMPT so we need + * the same cpu. It could be different if CONFIG_PREEMPTION so we need * to check if it is matched or not. */ do { tid = this_cpu_read(s->cpu_slab->tid); c = raw_cpu_ptr(s->cpu_slab); - } while (IS_ENABLED(CONFIG_PREEMPT) && + } while (IS_ENABLED(CONFIG_PREEMPTION) && unlikely(tid != READ_ONCE(c->tid))); /* @@ -2971,7 +2971,7 @@ redo: do { tid = this_cpu_read(s->cpu_slab->tid); c = raw_cpu_ptr(s->cpu_slab); - } while (IS_ENABLED(CONFIG_PREEMPT) && + } while (IS_ENABLED(CONFIG_PREEMPTION) && unlikely(tid != READ_ONCE(c->tid))); /* Same with comment on barrier() in slab_alloc_node() */