+ preempt-provide-preempt__nort-variants.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: preempt: provide preempt_*_(no)rt variants
has been added to the -mm tree.  Its filename is
     preempt-provide-preempt__nort-variants.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/preempt-provide-preempt__nort-variants.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/preempt-provide-preempt__nort-variants.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Subject: preempt: provide preempt_*_(no)rt variants

Patch series "Protect vmstats on PREEMPT_RT".

When adding local_lock support to mm/page_alloc.c and reducing the
overhead of vmstats in general, I wondered how vmstats could be safe on
PREEMPT_RT as it partially relies on interrupts being disabled for the
stats that must be accurate for correctness.  As it turns out, the
preempt-rt tree already encountered the same problem.

This series protects just the primary counters.  While there is another
vmstat-related patch, it is related to memcg getting using local_lock and
I have not fully considered those patches and whether they are ok as-is or
need modification but this series makes a start.

Patch 1 is authored by Thomas and has not being altered.

Patch 2 is authored by Ingo but I modified what he implemented for reasons
explained in the changelog.


This patch (of 2):

RT needs a few preempt_disable/enable points which are not necessary
otherwise.  Implement variants to avoid #ifdeffery.

Link: https://lkml.kernel.org/r/20210723100034.13353-1-mgorman@xxxxxxxxxxxxxxxxxxx
Link: https://lkml.kernel.org/r/20210723100034.13353-2-mgorman@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/preempt.h |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

--- a/include/linux/preempt.h~preempt-provide-preempt__nort-variants
+++ a/include/linux/preempt.h
@@ -184,7 +184,11 @@ do { \
 	preempt_count_dec(); \
 } while (0)
 
-#define preempt_enable_no_resched() sched_preempt_enable_no_resched()
+#ifdef CONFIG_PREEMPT_RT
+# define preempt_enable_no_resched() sched_preempt_enable_no_resched()
+#else
+# define preempt_enable_no_resched() preempt_enable()
+#endif
 
 #define preemptible()	(preempt_count() == 0 && !irqs_disabled())
 
@@ -278,6 +282,18 @@ do { \
 		set_preempt_need_resched(); \
 } while (0)
 
+#ifdef CONFIG_PREEMPT_RT
+# define preempt_disable_rt()		preempt_disable()
+# define preempt_enable_rt()		preempt_enable()
+# define preempt_disable_nort()		barrier()
+# define preempt_enable_nort()		barrier()
+#else
+# define preempt_disable_rt()		barrier()
+# define preempt_enable_rt()		barrier()
+# define preempt_disable_nort()		preempt_disable()
+# define preempt_enable_nort()		preempt_enable()
+#endif
+
 #ifdef CONFIG_PREEMPT_NOTIFIERS
 
 struct preempt_notifier;
_

Patches currently in -mm which might be from tglx@xxxxxxxxxxxxx are

preempt-provide-preempt__nort-variants.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux