Skip to content

Commit

Permalink
mm/compaction: Get rid of RT ifdeffery
Browse files Browse the repository at this point in the history
Move the RT dependency for the initial value of
sysctl_compact_unevictable_allowed into Kconfig.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220825164131.402717-7-bigeasy@linutronix.de
  • Loading branch information
KAGA-KOKO committed Sep 19, 2022
1 parent e575d40 commit c7e0b3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,12 @@ config COMPACTION
it and then we would be really interested to hear about that at
linux-mm@kvack.org.

config COMPACT_UNEVICTABLE_DEFAULT
int
depends on COMPACTION
default 0 if PREEMPT_RT
default 1

#
# support for free page reporting
config PAGE_REPORTING
Expand Down
6 changes: 1 addition & 5 deletions mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1727,11 +1727,7 @@ typedef enum {
* Allow userspace to control policy on scanning the unevictable LRU for
* compactable pages.
*/
#ifdef CONFIG_PREEMPT_RT
int sysctl_compact_unevictable_allowed __read_mostly = 0;
#else
int sysctl_compact_unevictable_allowed __read_mostly = 1;
#endif
int sysctl_compact_unevictable_allowed __read_mostly = CONFIG_COMPACT_UNEVICTABLE_DEFAULT;

static inline void
update_fast_start_pfn(struct compact_control *cc, unsigned long pfn)
Expand Down

0 comments on commit c7e0b3d

Please sign in to comment.