- sched-add-above-background-load-function.patch removed from -mm tree

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

 



The patch titled
     sched: add above background load function
has been removed from the -mm tree.  Its filename was
     sched-add-above-background-load-function.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: sched: add above background load function
From: Con Kolivas <kernel@xxxxxxxxxxx>

Add an above_background_load() function which can be used by other
subsystems to detect if there is anything besides niced tasks running. 
Place it in sched.h to allow it to be compiled out if not used.

Signed-off-by: Con Kolivas <kernel@xxxxxxxxxxx>
Acked-by: Ingo Molnar <mingo@xxxxxxx>
Cc: Peter Williams <pwil3058@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/sched.h |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff -puN include/linux/sched.h~sched-add-above-background-load-function include/linux/sched.h
--- a/include/linux/sched.h~sched-add-above-background-load-function
+++ a/include/linux/sched.h
@@ -784,6 +784,22 @@ struct sched_domain {
 
 #endif	/* CONFIG_SMP */
 
+/*
+ * A runqueue laden with a single nice 0 task scores a weighted_cpuload of
+ * SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a
+ * task of nice 0 or enough lower priority tasks to bring up the
+ * weighted_cpuload
+ */
+static inline int above_background_load(void)
+{
+	unsigned long cpu;
+
+	for_each_online_cpu(cpu) {
+		if (weighted_cpuload(cpu) >= SCHED_LOAD_SCALE)
+			return 1;
+	}
+	return 0;
+}
 
 struct io_context;			/* See blkdev.h */
 struct cpuset;
_

Patches currently in -mm which might be from kernel@xxxxxxxxxxx are

origin.patch
mm-implement-swap-prefetching.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux