linux-omap 2.6.36rc: move to 2.6.37rc
authorKoen Kooi <koen@openembedded.org>
Fri, 19 Nov 2010 13:28:56 +0000 (14:28 +0100)
committerKoen Kooi <koen@openembedded.org>
Fri, 19 Nov 2010 13:28:56 +0000 (14:28 +0100)
Signed-off-by: Koen Kooi <koen@beagleboard.org>
recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch [moved from recipes/linux/linux-omap-2.6.36rc/0001-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch with 98% similarity]
recipes/linux/linux-omap-2.6.37rc/0002-modedb.c-add-proper-720p60-mode.patch [moved from recipes/linux/linux-omap-2.6.36rc/0002-modedb.c-add-proper-720p60-mode.patch with 93% similarity]
recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-fix-USB-initialization-for-beagleboard-xM.patch [moved from recipes/linux/linux-omap-2.6.36rc/0003-ARM-OMAP-fix-USB-initialization-for-beagleboard-xM.patch with 93% similarity]
recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch [moved from recipes/linux/linux-omap-2.6.36rc/0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch with 93% similarity]
recipes/linux/linux-omap-2.6.37rc/0005-mmc-don-t-display-single-block-read-console-messages.patch [moved from recipes/linux/linux-omap-2.6.36rc/0005-mmc-don-t-display-single-block-read-console-messages.patch with 85% similarity]
recipes/linux/linux-omap-2.6.37rc/0006-MTD-silence-ecc-errors-on-mtdblock0.patch [moved from recipes/linux/linux-omap-2.6.36rc/0006-MTD-silence-ecc-errors-on-mtdblock0.patch with 92% similarity]
recipes/linux/linux-omap-2.6.37rc/0007-Miracle-patch.patch [new file with mode: 0644]
recipes/linux/linux-omap-2.6.37rc/0007-OMAP-DSS2-OMAPFB-use-phys_to_virt-for-RAM-mappings.patch [moved from recipes/linux/linux-omap-2.6.36rc/0007-OMAP-DSS2-OMAPFB-use-phys_to_virt-for-RAM-mappings.patch with 100% similarity]
recipes/linux/linux-omap-2.6.37rc/beagleboard/defconfig [moved from recipes/linux/linux-omap-2.6.36rc/beagleboard/defconfig with 100% similarity]
recipes/linux/linux-omap-2.6.37rc/beagleboard/logo_linux_clut224.ppm [moved from recipes/linux/linux-omap-2.6.36rc/beagleboard/logo_linux_clut224.ppm with 100% similarity]
recipes/linux/linux-omap_2.6.37rc.bb [moved from recipes/linux/linux-omap_2.6.36rc.bb with 79% similarity]

@@ -1,4 +1,4 @@
-From 0a4a761fcd1aa38e10b0ded14f57478f027cb7dc Mon Sep 17 00:00:00 2001
+From 26383be87990cba18af2da275d12781d179215a8 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Wed, 6 Oct 2010 10:19:34 +0200
 Subject: [PATCH 1/7] ARM: OMAP: beagleboard: Add infrastructure to do fixups based on expansionboard name passed by u-boot
@@ -11,7 +11,7 @@ Signed-off-by: Koen Kooi <koen@beagleboard.org>
  1 files changed, 139 insertions(+), 3 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
-index 73689c0..b3432f6 100644
+index 14f4224..9962932 100644
 --- a/arch/arm/mach-omap2/board-omap3beagle.c
 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
 @@ -21,6 +21,7 @@
@@ -213,7 +213,7 @@ index 73689c0..b3432f6 100644
 +
  MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
        /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
-       .phys_io        = 0x48000000,
+       .boot_params    = 0x80000100,
 -- 
 1.6.6.1
 
@@ -1,4 +1,4 @@
-From f00b23471128b0d6f98ae919e54187fb584b4b98 Mon Sep 17 00:00:00 2001
+From 3f6d595815a2362c3c7b3ed0db48aad2436f2c4e Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Mon, 8 Mar 2010 14:38:31 +0100
 Subject: [PATCH 2/7] modedb.c: add proper 720p60 mode
@@ -1,4 +1,4 @@
-From ed4123f2968492cb7128cddd0416d2594ec16f37 Mon Sep 17 00:00:00 2001
+From 5eca3854e9bd6fa1d27f2def25176bb9fc27b86d Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Thu, 7 Oct 2010 09:25:45 +0200
 Subject: [PATCH 3/7] ARM: OMAP: fix USB initialization for beagleboard-xM
@@ -9,7 +9,7 @@ Signed-off-by: Koen Kooi <koen@beagleboard.org>
  1 files changed, 7 insertions(+), 5 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
-index b3432f6..a0e5774 100644
+index 9962932..800ba5b 100644
 --- a/arch/arm/mach-omap2/board-omap3beagle.c
 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
 @@ -390,12 +390,14 @@ static int beagle_twl_gpio_setup(struct device *dev,
@@ -1,4 +1,4 @@
-From d19daf2d18bd343481b328eb7573557f425e9c31 Mon Sep 17 00:00:00 2001
+From c423f45fee0b6b5148e9ad31a79761b8562e2df8 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Thu, 7 Oct 2010 11:46:01 +0200
 Subject: [PATCH 4/7] ARM: OMAP: Power on EHCI, serial, camera and DVI on beagleboard-x<
@@ -9,7 +9,7 @@ Signed-off-by: Koen Kooi <koen@beagleboard.org>
  1 files changed, 19 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
-index a0e5774..e04c3af 100644
+index 800ba5b..3bc524c 100644
 --- a/arch/arm/mach-omap2/board-omap3beagle.c
 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
 @@ -399,6 +399,25 @@ static int beagle_twl_gpio_setup(struct device *dev,
@@ -1,4 +1,4 @@
-From 8e8ce81218c20765e194d988f90ae5f10afc1742 Mon Sep 17 00:00:00 2001
+From 386961b3ee4201286f1f0d91785a0edc9f053360 Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Mon, 4 Jan 2010 19:20:25 -0800
 Subject: [PATCH 5/7] mmc: don't display single block read console messages
@@ -9,10 +9,10 @@ mmc: don't display single block read console messages
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
-index d545f79..936df22 100644
+index 217f820..b0b68cc 100644
 --- a/drivers/mmc/card/block.c
 +++ b/drivers/mmc/card/block.c
-@@ -420,8 +420,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req)
+@@ -434,8 +434,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req)
                if (brq.cmd.error || brq.data.error || brq.stop.error) {
                        if (brq.data.blocks > 1 && rq_data_dir(req) == READ) {
                                /* Redo read one sector at a time */
@@ -1,4 +1,4 @@
-From 4b2f845548597524c49fcc47ed3ae8984f5caa58 Mon Sep 17 00:00:00 2001
+From 7565934e99f3e0b2a4d1bdae5542db7ceda03ccf Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Mon, 26 Apr 2010 11:17:26 -0700
 Subject: [PATCH 6/7] MTD: silence ecc errors on mtdblock0
@@ -14,10 +14,10 @@ this patch silences ecc error messages when linux peeks into mtdblock0
  3 files changed, 7 insertions(+), 5 deletions(-)
 
 diff --git a/block/blk-core.c b/block/blk-core.c
-index 32a1c12..6783ea1 100644
+index 4ce953f..1ef9a01 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
-@@ -2011,9 +2011,10 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
+@@ -2028,9 +2028,10 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
  
        if (error && req->cmd_type == REQ_TYPE_FS &&
            !(req->cmd_flags & REQ_QUIET)) {
@@ -45,7 +45,7 @@ index 271b8e7..5924ba7 100644
  }
  EXPORT_SYMBOL(__nand_correct_data);
 diff --git a/fs/buffer.c b/fs/buffer.c
-index 3e7dca2..a26d127 100644
+index 5930e38..06a00d5 100644
 --- a/fs/buffer.c
 +++ b/fs/buffer.c
 @@ -114,7 +114,8 @@ static int quiet_error(struct buffer_head *bh)
diff --git a/recipes/linux/linux-omap-2.6.37rc/0007-Miracle-patch.patch b/recipes/linux/linux-omap-2.6.37rc/0007-Miracle-patch.patch
new file mode 100644 (file)
index 0000000..a24acac
--- /dev/null
@@ -0,0 +1,504 @@
+From f88552cc59b8292b45dd16ec56198e50f040122a Mon Sep 17 00:00:00 2001
+From: Mike Galbraith <efault@gmx.de>
+Date: Fri, 19 Nov 2010 12:52:42 +0100
+Subject: [PATCH 7/7] Miracle patch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On Sun, 2010-11-14 at 16:26 -0800, Linus Torvalds wrote:
+> On Sun, Nov 14, 2010 at 4:15 PM, Linus Torvalds
+> <torvalds@linux-foundation.org> wrote:
+> >
+> > THAT is why I think it's so silly to try to be so strict and walk over
+> > all processes while holding a couple of spinlocks.
+>
+> Btw, let me say that I think the patch is great even with that thing
+> in. It looks clean, the thing I'm complaining about is not a big deal,
+> and it seems to perform very much as advertized. The difference with
+> autogroup scheduling is very noticeable with a simple "make -j64"
+> kernel compile.
+>
+> So I really don't think it's a big deal. The sysctl handler isn't even
+> complicated. But boy does it hurt my eyes to see a spinlock held
+> around a "do_each_thread()". And I do get the feeling that the
+> simplest way to fix it would be to just remove the code entirely, and
+> just say that "enabling/disabling may be delayed for old processes
+> with existing autogroups".
+
+Which is what I just did. If the oddball case isn't a big deal, the
+patch shrinks, which is a good thing. I just wanted to cover all bases.
+
+Patchlet with handler whacked:
+
+A recurring complaint from CFS users is that parallel kbuild has a negative
+impact on desktop interactivity.  This patch implements an idea from Linus,
+to automatically create task groups.  This patch only implements Linus' per
+tty task group suggestion, and only for fair class tasks, but leaves the way
+open for enhancement.
+
+Implementation: each task's signal struct contains an inherited pointer to a
+refcounted autogroup struct containing a task group pointer, the default for
+all tasks pointing to the init_task_group.  When a task calls __proc_set_tty(),
+the process wide reference to the default group is dropped, a new task group is
+created, and the process is moved into the new task group.  Children thereafter
+inherit this task group, and increase it's refcount.  On exit, a reference to the
+current task group is dropped when the last reference to each signal struct is
+dropped.  The task group is destroyed when the last signal struct referencing
+it is freed.   At runqueue selection time, IFF a task has no cgroup assignment,
+it's current autogroup is used.
+
+The feature is enabled from boot by default if CONFIG_SCHED_AUTOGROUP is
+selected, but can be disabled via the boot option noautogroup, and can be
+also be turned on/off on the fly via..
+   echo [01] > /proc/sys/kernel/sched_autogroup_enabled.
+..which will automatically move tasks to/from the root task group.
+
+Some numbers.
+
+A 100% hog overhead measurement proggy pinned to the same CPU as a make -j10
+
+About measurement proggy:
+  pert/sec = perturbations/sec
+  min/max/avg = scheduler service latencies in usecs
+  sum/s = time accrued by the competition per sample period (1 sec here)
+  overhead = %CPU received by the competition per sample period
+
+pert/s:       31 >40475.37us:        3 min:  0.37 max:48103.60 avg:29573.74 sum/s:916786us overhead:90.24%
+pert/s:       23 >41237.70us:       12 min:  0.36 max:56010.39 avg:40187.01 sum/s:924301us overhead:91.99%
+pert/s:       24 >42150.22us:       12 min:  8.86 max:61265.91 avg:39459.91 sum/s:947038us overhead:92.20%
+pert/s:       26 >42344.91us:       11 min:  3.83 max:52029.60 avg:36164.70 sum/s:940282us overhead:91.12%
+pert/s:       24 >44262.90us:       14 min:  5.05 max:82735.15 avg:40314.33 sum/s:967544us overhead:92.22%
+
+Same load with this patch applied.
+
+pert/s:      229 >5484.43us:       41 min:  0.15 max:12069.42 avg:2193.81 sum/s:502382us overhead:50.24%
+pert/s:      222 >5652.28us:       43 min:  0.46 max:12077.31 avg:2248.56 sum/s:499181us overhead:49.92%
+pert/s:      211 >5809.38us:       43 min:  0.16 max:12064.78 avg:2381.70 sum/s:502538us overhead:50.25%
+pert/s:      223 >6147.92us:       43 min:  0.15 max:16107.46 avg:2282.17 sum/s:508925us overhead:50.49%
+pert/s:      218 >6252.64us:       43 min:  0.16 max:12066.13 avg:2324.11 sum/s:506656us overhead:50.27%
+
+Average service latency is an order of magnitude better with autogroup.
+(Imagine that pert were Xorg or whatnot instead)
+
+Using Mathieu Desnoyers' wakeup-latency testcase:
+
+With taskset -c 3 make -j 10 running..
+
+taskset -c 3 ./wakeup-latency& sleep 30;killall wakeup-latency
+
+without:
+maximum latency: 42963.2 µs
+average latency: 9077.0 µs
+missed timer events: 0
+
+with:
+maximum latency: 4160.7 µs
+average latency: 149.4 µs
+missed timer events: 0
+
+Signed-off-by: Mike Galbraith <efault@gmx.de>
+---
+ Documentation/kernel-parameters.txt |    2 +
+ drivers/tty/tty_io.c                |    1 +
+ include/linux/sched.h               |   19 +++++
+ init/Kconfig                        |   12 +++
+ kernel/fork.c                       |    5 +-
+ kernel/sched.c                      |   25 ++++--
+ kernel/sched_autogroup.c            |  140 +++++++++++++++++++++++++++++++++++
+ kernel/sched_autogroup.h            |   18 +++++
+ kernel/sysctl.c                     |   11 +++
+ 9 files changed, 224 insertions(+), 9 deletions(-)
+ create mode 100644 kernel/sched_autogroup.c
+ create mode 100644 kernel/sched_autogroup.h
+
+diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
+index 92e83e5..86820a7 100644
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -1622,6 +1622,8 @@ and is between 256 and 4096 characters. It is defined in the file
+       noapic          [SMP,APIC] Tells the kernel to not make use of any
+                       IOAPICs that may be present in the system.
++      noautogroup     Disable scheduler automatic task group creation.
++
+       nobats          [PPC] Do not use BATs for mapping kernel lowmem
+                       on "Classic" PPC cores.
+diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
+index c05c5af..5698038 100644
+--- a/drivers/tty/tty_io.c
++++ b/drivers/tty/tty_io.c
+@@ -3160,6 +3160,7 @@ static void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty)
+       put_pid(tsk->signal->tty_old_pgrp);
+       tsk->signal->tty = tty_kref_get(tty);
+       tsk->signal->tty_old_pgrp = NULL;
++      sched_autogroup_create_attach(tsk);
+ }
+ static void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty)
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index d0036e5..6dff9ac 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
+@@ -509,6 +509,8 @@ struct thread_group_cputimer {
+       spinlock_t lock;
+ };
++struct autogroup;
++
+ /*
+  * NOTE! "signal_struct" does not have it's own
+  * locking, because a shared signal_struct always
+@@ -576,6 +578,9 @@ struct signal_struct {
+       struct tty_struct *tty; /* NULL if no tty */
++#ifdef CONFIG_SCHED_AUTOGROUP
++      struct autogroup *autogroup;
++#endif
+       /*
+        * Cumulative resource counters for dead threads in the group,
+        * and for reaped dead child processes forked by this group.
+@@ -1930,6 +1935,20 @@ int sched_rt_handler(struct ctl_table *table, int write,
+ extern unsigned int sysctl_sched_compat_yield;
++#ifdef CONFIG_SCHED_AUTOGROUP
++extern unsigned int sysctl_sched_autogroup_enabled;
++
++extern void sched_autogroup_create_attach(struct task_struct *p);
++extern void sched_autogroup_detach(struct task_struct *p);
++extern void sched_autogroup_fork(struct signal_struct *sig);
++extern void sched_autogroup_exit(struct signal_struct *sig);
++#else
++static inline void sched_autogroup_create_attach(struct task_struct *p) { }
++static inline void sched_autogroup_detach(struct task_struct *p) { }
++static inline void sched_autogroup_fork(struct signal_struct *sig) { }
++static inline void sched_autogroup_exit(struct signal_struct *sig) { }
++#endif
++
+ #ifdef CONFIG_RT_MUTEXES
+ extern int rt_mutex_getprio(struct task_struct *p);
+ extern void rt_mutex_setprio(struct task_struct *p, int prio);
+diff --git a/init/Kconfig b/init/Kconfig
+index 88c1046..8fc6606 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -728,6 +728,18 @@ config NET_NS
+ endif # NAMESPACES
++config SCHED_AUTOGROUP
++      bool "Automatic process group scheduling"
++      select CGROUPS
++      select CGROUP_SCHED
++      select FAIR_GROUP_SCHED
++      help
++        This option optimizes the scheduler for common desktop workloads by
++        automatically creating and populating task groups.  This separation
++        of workloads isolates aggressive CPU burners (like build jobs) from
++        desktop applications.  Task group autogeneration is currently based
++        upon task tty association.
++
+ config MM_OWNER
+       bool
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 3b159c5..b6f2475 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -174,8 +174,10 @@ static inline void free_signal_struct(struct signal_struct *sig)
+ static inline void put_signal_struct(struct signal_struct *sig)
+ {
+-      if (atomic_dec_and_test(&sig->sigcnt))
++      if (atomic_dec_and_test(&sig->sigcnt)) {
++              sched_autogroup_exit(sig);
+               free_signal_struct(sig);
++      }
+ }
+ void __put_task_struct(struct task_struct *tsk)
+@@ -904,6 +906,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
+       posix_cpu_timers_init_group(sig);
+       tty_audit_fork(sig);
++      sched_autogroup_fork(sig);
+       sig->oom_adj = current->signal->oom_adj;
+       sig->oom_score_adj = current->signal->oom_score_adj;
+diff --git a/kernel/sched.c b/kernel/sched.c
+index aa14a56..ba9d6e7 100644
+--- a/kernel/sched.c
++++ b/kernel/sched.c
+@@ -78,6 +78,7 @@
+ #include "sched_cpupri.h"
+ #include "workqueue_sched.h"
++#include "sched_autogroup.h"
+ #define CREATE_TRACE_POINTS
+ #include <trace/events/sched.h>
+@@ -615,11 +616,14 @@ static inline int cpu_of(struct rq *rq)
+  */
+ static inline struct task_group *task_group(struct task_struct *p)
+ {
++      struct task_group *tg;
+       struct cgroup_subsys_state *css;
+       css = task_subsys_state_check(p, cpu_cgroup_subsys_id,
+                       lockdep_is_held(&task_rq(p)->lock));
+-      return container_of(css, struct task_group, css);
++      tg = container_of(css, struct task_group, css);
++
++      return autogroup_task_group(p, tg);
+ }
+ /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */
+@@ -2016,6 +2020,7 @@ static void sched_irq_time_avg_update(struct rq *rq, u64 curr_irq_time) { }
+ #include "sched_idletask.c"
+ #include "sched_fair.c"
+ #include "sched_rt.c"
++#include "sched_autogroup.c"
+ #include "sched_stoptask.c"
+ #ifdef CONFIG_SCHED_DEBUG
+ # include "sched_debug.c"
+@@ -7962,7 +7967,7 @@ void __init sched_init(void)
+ #ifdef CONFIG_CGROUP_SCHED
+       list_add(&init_task_group.list, &task_groups);
+       INIT_LIST_HEAD(&init_task_group.children);
+-
++      autogroup_init(&init_task);
+ #endif /* CONFIG_CGROUP_SCHED */
+ #if defined CONFIG_FAIR_GROUP_SCHED && defined CONFIG_SMP
+@@ -8492,15 +8497,11 @@ void sched_destroy_group(struct task_group *tg)
+ /* change task's runqueue when it moves between groups.
+  *    The caller of this function should have put the task in its new group
+  *    by now. This function just updates tsk->se.cfs_rq and tsk->se.parent to
+- *    reflect its new group.
++ *    reflect its new group.  Called with the runqueue lock held.
+  */
+-void sched_move_task(struct task_struct *tsk)
++void __sched_move_task(struct task_struct *tsk, struct rq *rq)
+ {
+       int on_rq, running;
+-      unsigned long flags;
+-      struct rq *rq;
+-
+-      rq = task_rq_lock(tsk, &flags);
+       running = task_current(rq, tsk);
+       on_rq = tsk->se.on_rq;
+@@ -8521,7 +8522,15 @@ void sched_move_task(struct task_struct *tsk)
+               tsk->sched_class->set_curr_task(rq);
+       if (on_rq)
+               enqueue_task(rq, tsk, 0);
++}
++void sched_move_task(struct task_struct *tsk)
++{
++      struct rq *rq;
++      unsigned long flags;
++
++      rq = task_rq_lock(tsk, &flags);
++      __sched_move_task(tsk, rq);
+       task_rq_unlock(rq, &flags);
+ }
+ #endif /* CONFIG_CGROUP_SCHED */
+diff --git a/kernel/sched_autogroup.c b/kernel/sched_autogroup.c
+new file mode 100644
+index 0000000..62f1d0e
+--- /dev/null
++++ b/kernel/sched_autogroup.c
+@@ -0,0 +1,140 @@
++#ifdef CONFIG_SCHED_AUTOGROUP
++
++unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
++
++struct autogroup {
++      struct kref             kref;
++      struct task_group       *tg;
++};
++
++static struct autogroup autogroup_default;
++
++static void autogroup_init(struct task_struct *init_task)
++{
++      autogroup_default.tg = &init_task_group;
++      kref_init(&autogroup_default.kref);
++      init_task->signal->autogroup = &autogroup_default;
++}
++
++static inline void autogroup_destroy(struct kref *kref)
++{
++      struct autogroup *ag = container_of(kref, struct autogroup, kref);
++      struct task_group *tg = ag->tg;
++
++      kfree(ag);
++      sched_destroy_group(tg);
++}
++
++static inline void autogroup_kref_put(struct autogroup *ag)
++{
++      kref_put(&ag->kref, autogroup_destroy);
++}
++
++static inline struct autogroup *autogroup_kref_get(struct autogroup *ag)
++{
++      kref_get(&ag->kref);
++      return ag;
++}
++
++static inline struct autogroup *autogroup_create(void)
++{
++      struct autogroup *ag = kmalloc(sizeof(*ag), GFP_KERNEL);
++
++      if (!ag)
++              goto out_fail;
++
++      ag->tg = sched_create_group(&init_task_group);
++      kref_init(&ag->kref);
++
++      if (!(IS_ERR(ag->tg)))
++              return ag;
++
++out_fail:
++      if (ag) {
++              kfree(ag);
++              WARN_ON(1);
++      } else
++              WARN_ON(1);
++
++      return autogroup_kref_get(&autogroup_default);
++}
++
++static inline struct task_group *
++autogroup_task_group(struct task_struct *p, struct task_group *tg)
++{
++      int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled);
++
++      enabled &= (tg == &root_task_group);
++      enabled &= (p->sched_class == &fair_sched_class);
++      enabled &= (!(p->flags & PF_EXITING));
++
++      if (enabled)
++              return p->signal->autogroup->tg;
++
++      return tg;
++}
++
++static void
++autogroup_move_group(struct task_struct *p, struct autogroup *ag)
++{
++      struct autogroup *prev;
++      struct task_struct *t;
++      struct rq *rq;
++      unsigned long flags;
++
++      rq = task_rq_lock(p, &flags);
++      prev = p->signal->autogroup;
++      if (prev == ag) {
++              task_rq_unlock(rq, &flags);
++              return;
++      }
++
++      p->signal->autogroup = autogroup_kref_get(ag);
++      __sched_move_task(p, rq);
++      task_rq_unlock(rq, &flags);
++
++      rcu_read_lock();
++      list_for_each_entry_rcu(t, &p->thread_group, thread_group) {
++              sched_move_task(t);
++      }
++      rcu_read_unlock();
++
++      autogroup_kref_put(prev);
++}
++
++void sched_autogroup_create_attach(struct task_struct *p)
++{
++      struct autogroup *ag = autogroup_create();
++
++      autogroup_move_group(p, ag);
++      /* drop extra refrence added by autogroup_create() */
++      autogroup_kref_put(ag);
++}
++EXPORT_SYMBOL(sched_autogroup_create_attach);
++
++/* currently has no users */
++void sched_autogroup_detach(struct task_struct *p)
++{
++      autogroup_move_group(p, &autogroup_default);
++}
++EXPORT_SYMBOL(sched_autogroup_detach);
++
++void sched_autogroup_fork(struct signal_struct *sig)
++{
++      sig->autogroup = autogroup_kref_get(current->signal->autogroup);
++}
++
++void sched_autogroup_exit(struct signal_struct *sig)
++{
++      autogroup_kref_put(sig->autogroup);
++}
++
++static int __init setup_autogroup(char *str)
++{
++      sysctl_sched_autogroup_enabled = 0;
++
++      return 1;
++}
++
++__setup("noautogroup", setup_autogroup);
++#endif
+diff --git a/kernel/sched_autogroup.h b/kernel/sched_autogroup.h
+new file mode 100644
+index 0000000..6048f5d
+--- /dev/null
++++ b/kernel/sched_autogroup.h
+@@ -0,0 +1,18 @@
++#ifdef CONFIG_SCHED_AUTOGROUP
++
++static void __sched_move_task(struct task_struct *tsk, struct rq *rq);
++
++static inline struct task_group *
++autogroup_task_group(struct task_struct *p, struct task_group *tg);
++
++#else /* !CONFIG_SCHED_AUTOGROUP */
++
++static inline void autogroup_init(struct task_struct *init_task) {  }
++
++static inline struct task_group *
++autogroup_task_group(struct task_struct *p, struct task_group *tg)
++{
++      return tg;
++}
++
++#endif /* CONFIG_SCHED_AUTOGROUP */
+diff --git a/kernel/sysctl.c b/kernel/sysctl.c
+index b65bf63..983e6b2 100644
+--- a/kernel/sysctl.c
++++ b/kernel/sysctl.c
+@@ -382,6 +382,17 @@ static struct ctl_table kern_table[] = {
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
++#ifdef CONFIG_SCHED_AUTOGROUP
++      {
++              .procname       = "sched_autogroup_enabled",
++              .data           = &sysctl_sched_autogroup_enabled,
++              .maxlen         = sizeof(unsigned int),
++              .mode           = 0644,
++              .proc_handler   = proc_dointvec,
++              .extra1         = &zero,
++              .extra2         = &one,
++      },
++#endif
+ #ifdef CONFIG_PROVE_LOCKING
+       {
+               .procname       = "prove_locking",
+-- 
+1.6.6.1
+
similarity index 79%
rename from recipes/linux/linux-omap_2.6.36rc.bb
rename to recipes/linux/linux-omap_2.6.37rc.bb
index 64200e1..68851f1 100644 (file)
@@ -8,11 +8,11 @@ COMPATIBLE_MACHINE = "beagleboard"
 DEFAULT_PREFERENCE = "-1"
 
 # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc
-PV = "2.6.35+2.6.36-rc7"
-MACHINE_KERNEL_PR_append = "d+gitr${SRCREV}"
-SRCREV = "67572a62f10351528af72a6ae41129b68aacf1f3"
+PV = "2.6.36+2.6.37-rc2"
+MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}"
+SRCREV = "8973a21e18241081d16693504d7c0ed5b9918716"
 
-FILESPATHPKG_prepend = "linux-omap-2.6.36rc:"
+FILESPATHPKG_prepend = "linux-omap-2.6.37rc:"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \
           file://defconfig"
@@ -24,7 +24,7 @@ SRC_URI_append = " \
                   file://0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch \
                   file://0005-mmc-don-t-display-single-block-read-console-messages.patch \
                   file://0006-MTD-silence-ecc-errors-on-mtdblock0.patch \
-                  file://0007-OMAP-DSS2-OMAPFB-use-phys_to_virt-for-RAM-mappings.patch \
+                  file://0007-Miracle-patch.patch \
 "
 
 SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \