Linux 3.8.13.13-rt25-rc1
Subsystems (9)
cover Linux 3.8.13.13-rt25-rc1
Dear RT Folks,
This is the RT stable review cycle of patch 3.8.13.13-rt25-rc1.
Please scream at me if I messed something up. Please test the patches too.
The -rc release will be uploaded to kernel.org and will be deleted when the final release is out. This is just a review release (or release candidate).
The pre-releases will not be pushed to the git repository, only the final release is.
If all goes well, this patch will be converted to the next main release on 11/25/2013.
Enjoy,
-- Steve
To build 3.8.13.13-rt25-rc1 directly, the following patches should be applied:
http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.tar.xz
http://www.kernel.org/pub/linux/kernel/v3.x/patch-3.8.13.13.xz
http://www.kernel.org/pub/linux/kernel/projects/rt/3.8/patch-3.8.13.13-rt25-rc1.patch.xz
You can also build from 3.8.13.13-rt24 by applying the incremental patch:
http://www.kernel.org/pub/linux/kernel/projects/rt/3.8/incr/patch-3.8.13.13-rt24-rt25-rc1.patch.xz
Changes from 3.8.13.13-rt24:
---
Mike Galbraith (1):
hwlat-detector: Don't ignore threshold module parameter
Sebastian Andrzej Siewior (2):
mm/slub: do not rely on slab_cached passed to free_delayed()
drm: remove preempt_disable() from drm_calc_vbltimestamp_from_scanoutpos()
Steven Rostedt (Red Hat) (1):
Linux 3.8.13.13-rt25-rc1
Thomas Pfaff (1):
genirq: Set the irq thread policy without checking CAP_SYS_NICE
Wolfram Sang (1):
Kind of revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()"
Yang Shi (1):
mm/memcontrol: Don't call schedule_work_on in preemption disabled context
----
arch/powerpc/platforms/52xx/mpc52xx_pic.c | 5 ++--- drivers/gpu/drm/drm_irq.c | 7 ------- drivers/misc/hwlat_detector.c | 2 +- kernel/irq/manage.c | 2 +- localversion-rt | 2 +- mm/memcontrol.c | 4 ++-- mm/slub.c | 10 +++++----- 7 files changed, 12 insertions(+), 20 deletions(-)
PATCH 1/7 genirq: Set the irq thread policy without checking CAP_SYS_NICE
3.8.13.13-rt25-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Thomas Pfaff <[email protected]>
In commit ee23871389 ("genirq: Set irq thread to RT priority on creation") we moved the assigment of the thread's priority from the thread's function into __setup_irq(). That function may run in user context for instance if the user opens an UART node and then driver calls requests in the ->open() callback. That user may not have CAP_SYS_NICE and so the irq thread won't run with the SCHED_OTHER policy.
This patch uses sched_setscheduler_nocheck() so we omit the CAP_SYS_NICE check which is otherwise required for the SCHED_OTHER policy.
--- kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
@@ -1044,7 +1044,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) goto out_mput; } -sched_setscheduler (t,SCHED_FIFO , ¶m); +sched_setscheduler_nocheck (t,SCHED_FIFO , ¶m);/* * We keep the reference to the task struct even if
Signature · 1 line
1.8.4.rc3
PATCH 2/7 Kind of revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()"
In reply to Steven Rostedt3.8.13.13-rt25-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Wolfram Sang <[email protected]>
This more or less reverts commit 6391f697d4892a6f233501beea553e13f7745a23. Instead of adding an unneeded 'default', mark the variable to prevent the false positive 'uninitialized var'. The other change (fixing the printout) needs revert, too. We want to know WHICH critical irq failed, not which level it had.
--- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/powerpc/platforms/52xx/mpc52xx_pic.c +2 -3
@@ -340,7 +340,7 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq, {int l1irq;int l2irq; -struct irq_chip *irqchip; +struct irq_chip *uninitialized_var (irqchip );void *hndlr;int type;u32 reg;
@@ -373,9 +373,8 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip;break ;case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip;break ;case MPC52xx_IRQ_L1_CRIT: -default :pr_warn ("%s: Critical IRQ #%d is unsupported! Nopping it.\n" , - __func__, l1irq); + __func__, l2irq);irq_set_chip (virq, &no_irq_chip);return 0 ; }
Signature · 1 line
1.8.4.rc3
PATCH 3/7 hwlat-detector: Dont ignore threshold module parameter
In reply to Steven Rostedt3.8.13.13-rt25-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Mike Galbraith <[email protected]>
If the user specified a threshold at module load time, use it.
--- drivers/misc/hwlat_detector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/hwlat_detector.c +1 -1
@@ -413,7 +413,7 @@ static int init_stats(void) goto out;__reset_stats (); - data.threshold =DEFAULT_LAT_THRESHOLD ;/* threshold us */ + data.threshold = threshold ?:DEFAULT_LAT_THRESHOLD ;/* threshold us */ data.sample_window =DEFAULT_SAMPLE_WINDOW ;/* window us */ data.sample_width =DEFAULT_SAMPLE_WIDTH ;/* width us */
Signature · 1 line
1.8.4.rc3
PATCH 4/7 mm/slub: do not rely on slab_cached passed to free_delayed()
In reply to Steven Rostedt3.8.13.13-rt25-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <[email protected]>
You can get this backtrace:
| =============================================================================
| BUG dentry (Not tainted): Padding overwritten. 0xf15e1ec0-0xf15e1f1f
| -----------------------------------------------------------------------------
|
| Disabling lock debugging due to kernel taint
| INFO: Slab 0xf6f10b00 objects=21 used=0 fp=0xf15e0480 flags=0x2804080
| CPU: 6 PID: 1 Comm: systemd Tainted: G B 3.10.17-rt12+ #197
| Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
| f6f10b00 f6f10b00 f20a3be8 c149da9e f20a3c74 c110b0d6 c15e010c f6f10b00
| 00000015 00000000 f15e0480 02804080 64646150 20676e69 7265766f 74697277
| 2e6e6574 66783020 31653531 2d306365 31667830 66316535 00006631 00000046
| Call Trace:
| [<c149da9e>] dump_stack+0x16/0x18
| [<c110b0d6>] slab_err+0x76/0x80
| [<c110c231>] ? deactivate_slab+0x3f1/0x4a0
| [<c110c231>] ? deactivate_slab+0x3f1/0x4a0
| [<c110b56f>] slab_pad_check.part.54+0xbf/0x150
| [<c110ba04>] __free_slab+0x124/0x130
| [<c149bb79>] ? __slab_alloc.constprop.69+0x27b/0x5d3
| [<c110ba39>] free_delayed+0x29/0x40
| [<c149bec5>] __slab_alloc.constprop.69+0x5c7/0x5d3
| [<c1126062>] ? __d_alloc+0x22/0x150
| [<c1126062>] ? __d_alloc+0x22/0x150
| [<c11265b0>] ? __d_lookup_rcu+0x160/0x160
| [<c110d912>] kmem_cache_alloc+0x162/0x190
| [<c112668b>] ? __d_lookup+0xdb/0x1d0
| [<c1126062>] ? __d_alloc+0x22/0x150
| [<c1126062>] __d_alloc+0x22/0x150
| [<c11261a5>] d_alloc+0x15/0x60
| [<c111aec1>] lookup_dcache+0x71/0xa0
| [<c111af0e>] __lookup_hash+0x1e/0x40
| [<c111b374>] lookup_slow+0x34/0x90
| [<c111c3c7>] link_path_walk+0x737/0x780
| [<c111a3d4>] ? path_get+0x24/0x40
| [<c111a3df>] ? path_get+0x2f/0x40
| [<c111bfb2>] link_path_walk+0x322/0x780
| [<c111e3ed>] path_openat.isra.54+0x7d/0x400
| [<c111f32b>] do_filp_open+0x2b/0x70
| [<c11110a2>] do_sys_open+0xe2/0x1b0
| [<c14a319f>] ? restore_all+0xf/0xf
| [<c102bb80>] ? vmalloc_sync_all+0x10/0x10
| [<c1111192>] SyS_open+0x22/0x30
| [<c14a393e>] sysenter_do_call+0x12/0x36
| Padding f15e1de0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ
| Padding f15e1df0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ
| Padding f15e1e00: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
| Padding f15e1e10: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
| Padding f15e1e20: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
| Padding f15e1e30: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
| Padding f15e1e40: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
| Padding f15e1e50: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
| Padding f15e1e60: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk
| Padding f15e1e70: 6b 6b 6b 6b 6b 6b 6b a5 bb bb bb bb 80 01 5e f1 kkkkkkk.......^.
| Padding f15e1e80: 53 7e 0d c1 c3 bd 49 c1 12 d9 10 c1 53 7e 0d c1 S~....I.....S~..
| Padding f15e1e90: 60 7f 0d c1 e0 05 14 c1 ce d1 13 c1 96 d4 13 c1 `...............
| Padding f15e1ea0: e9 e0 13 c1 f7 48 17 c1 13 6a 17 c1 41 fb 17 c1 .....H...j..A...
| Padding f15e1eb0: 07 a4 11 c1 22 af 11 c1 74 b3 11 c1 06 d2 11 c1 ...."...t.......
| Padding f15e1ec0: c6 d2 11 c1 06 00 00 00 01 00 00 00 f3 dc fe ff ................
| Padding f15e1ed0: 73 7e 0d c1 5d b4 49 c1 ec c4 10 c1 73 7e 0d c1 s~..].I.....s~..
| Padding f15e1ee0: 50 83 0d c1 79 09 14 c1 fd b9 13 c1 5a f2 13 c1 P...y.......Z...
| Padding f15e1ef0: 7b 1c 28 c1 03 20 28 c1 9e 25 28 c1 b3 26 28 c1 {.(.. (..%(..&(.
| Padding f15e1f00: f4 ab 34 c1 bc 89 30 c1 e5 0d 0a c1 c1 0f 0a c1 ..4...0.........
| Padding f15e1f10: ae 34 0a c1 00 00 00 00 00 00 00 00 f3 dc fe ff .4..............
| FIX dentry: Restoring 0xf15e1de0-0xf15e1f1f=0x5a
|
| =============================================================================
| BUG dentry (Tainted: G B ): Redzone overwritten
| -----------------------------------------------------------------------------
|
| INFO: 0xf15e009c-0xf15e009f. First byte 0x96 instead of 0xbb
| INFO: Allocated in __ext4_get_inode_loc+0x3b7/0x460 age=1054261382 cpu=3239295485 pid=-1055657382
| ext4_iget+0x63/0x9c0
| ext4_lookup+0x71/0x180
| lookup_real+0x17/0x40
| do_last.isra.53+0x72b/0xbc0
| path_openat.isra.54+0x9d/0x400
| do_filp_open+0x2b/0x70
| do_sys_open+0xe2/0x1b0
| 0x7
| 0x1
| 0xfffedcf2
| mempool_free_slab+0x13/0x20
| __slab_free+0x3d/0x3ae
| kmem_cache_free+0x1bc/0x1d0
| mempool_free_slab+0x13/0x20
| mempool_free+0x40/0x90
| bio_put+0x59/0x70
| INFO: Freed in blk_update_bidi_request+0x13/0x70 age=2779021993 cpu=1515870810 pid=1515870810
| __blk_end_bidi_request+0x1e/0x50
| __blk_end_request_all+0x23/0x40
| virtblk_done+0xf4/0x260
| vring_interrupt+0x2c/0x50
| handle_irq_event_percpu+0x45/0x1f0
| handle_irq_event+0x31/0x50
| handle_edge_irq+0x6e/0x130
| 0x5
| INFO: Slab 0xf6f10b00 objects=21 used=0 fp=0xf15e0480 flags=0x2804080
| INFO: Object 0xf15e0000 @offset=0 fp=0xc113e0e9If you try to free memory in irqs_disabled(). This is then added to the slub_free_list list. The following allocation then might be from a different kmem_cache. If the two caches have a different SLAB_DEBUG_FLAGS then one might complain about bad bad marker which are actually not used.
--- mm/slub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
mm/slub.c +5 -5
@@ -1427,13 +1427,13 @@ static void __free_slab(struct kmem_cache *s, struct page *page)__free_memcg_kmem_pages (page, order); } -static void free_delayed (struct kmem_cache *s,struct list_head *h) +static void free_delayed (struct list_head *h) {while (!list_empty (h)) { struct page *page = list_first_entry(h, struct page, lru);list_del (&page->lru); -__free_slab (s, page); +__free_slab (page->slab_cache, page); } }
@@ -2004,7 +2004,7 @@ static int put_cpu_partial(struct kmem_cache *s, struct page *page, int drain)list_splice_init (&f->list, &tofree);raw_spin_unlock (&f->lock);local_irq_restore (flags); -free_delayed (s, &tofree); +free_delayed (&tofree); oldpage =NULL ; pobjects =0 ; pages =0 ;
@@ -2081,7 +2081,7 @@ static void flush_all(struct kmem_cache *s)raw_spin_lock_irq (&f->lock);list_splice_init (&f->list, &tofree);raw_spin_unlock_irq (&f->lock); -free_delayed (s, &tofree); +free_delayed (&tofree); } }
@@ -2329,7 +2329,7 @@ out:list_splice_init (&f->list, &tofree);raw_spin_unlock (&f->lock);local_irq_restore (flags); -free_delayed (s, &tofree); +free_delayed (&tofree);return freelist; new_slab:
Signature · 1 line
1.8.4.rc3
PATCH 5/7 mm/memcontrol: Dont call schedule_work_on in preemption disabled context
In reply to Steven Rostedt3.8.13.13-rt25-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Yang Shi <[email protected]>
The following trace is triggered when running ltp oom test cases:
BUG: sleeping function called from invalid context at kernel/rtmutex.c:659
in_atomic(): 1, irqs_disabled(): 0, pid: 17188, name: oom03 Preemption disabled at:[<ffffffff8112ba70>] mem_cgroup_reclaim+0x90/0xe0
CPU: 2 PID: 17188 Comm: oom03 Not tainted 3.10.10-rt3 #2 Hardware name: Intel Corporation Calpella platform/MATXM-CORE-411-B, BIOS 4.6.3 08/18/2010 ffff88007684d730 ffff880070df9b58 ffffffff8169918d ffff880070df9b70 ffffffff8106db31 ffff88007688b4a0 ffff880070df9b88 ffffffff8169d9c0 ffff88007688b4a0 ffff880070df9bc8 ffffffff81059da1 0000000170df9bb0 Call Trace: [<ffffffff8169918d>] dump_stack+0x19/0x1b [<ffffffff8106db31>] __might_sleep+0xf1/0x170 [<ffffffff8169d9c0>] rt_spin_lock+0x20/0x50 [<ffffffff81059da1>] queue_work_on+0x61/0x100 [<ffffffff8112b361>] drain_all_stock+0xe1/0x1c0 [<ffffffff8112ba70>] mem_cgroup_reclaim+0x90/0xe0 [<ffffffff8112beda>] __mem_cgroup_try_charge+0x41a/0xc40 [<ffffffff810f1c91>] ? release_pages+0x1b1/0x1f0 [<ffffffff8106f200>] ? sched_exec+0x40/0xb0 [<ffffffff8112cc87>] mem_cgroup_charge_common+0x37/0x70 [<ffffffff8112e2c6>] mem_cgroup_newpage_charge+0x26/0x30 [<ffffffff8110af68>] handle_pte_fault+0x618/0x840 [<ffffffff8103ecf6>] ? unpin_current_cpu+0x16/0x70 [<ffffffff81070f94>] ? migrate_enable+0xd4/0x200 [<ffffffff8110cde5>] handle_mm_fault+0x145/0x1e0 [<ffffffff810301e1>] __do_page_fault+0x1a1/0x4c0 [<ffffffff8169c9eb>] ? preempt_schedule_irq+0x4b/0x70 [<ffffffff8169e3b7>] ? retint_kernel+0x37/0x40 [<ffffffff8103053e>] do_page_fault+0xe/0x10 [<ffffffff8169e4c2>] page_fault+0x22/0x30
So, to prevent schedule_work_on from being called in preempt disabled context, replace the pair of get/put_cpu() to get/put_cpu_light().
--- mm/memcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/memcontrol.c +2 -2
@@ -2283,7 +2283,7 @@ static void drain_all_stock(struct mem_cgroup *root_memcg, bool sync)/* Notify other cpus that system-wide "drain" is running */ get_online_cpus (); - curcpu =get_cpu (); + curcpu =get_cpu_light ();for_each_online_cpu (cpu) {struct memcg_stock_pcp *stock = &per_cpu (memcg_stock, cpu);struct mem_cgroup *memcg;
@@ -2300,7 +2300,7 @@ static void drain_all_stock(struct mem_cgroup *root_memcg, bool sync)schedule_work_on (cpu, &stock->work); } } -put_cpu (); +put_cpu_light ();if (!sync) goto out;
Signature · 1 line
1.8.4.rc3
PATCH 6/7 drm: remove preempt_disable() from drm_calc_vbltimestamp_from_scanoutpos()
In reply to Steven Rostedt3.8.13.13-rt25-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <[email protected]>
Luis captured the following:
| BUG: sleeping function called from invalid context at kernel/rtmutex.c:659
| in_atomic(): 1, irqs_disabled(): 0, pid: 517, name: Xorg
| 2 locks held by Xorg/517:
| #0:
| (
| &dev->vbl_lock
| ){......}
| , at:
| [<ffffffffa0024c60>] drm_vblank_get+0x30/0x2b0 [drm]
| #1:
| (
| &dev->vblank_time_lock
| ){......}
| , at:
| [<ffffffffa0024ce1>] drm_vblank_get+0xb1/0x2b0 [drm]
| Preemption disabled at:
| [<ffffffffa008bc95>] i915_get_vblank_timestamp+0x45/0xa0 [i915]
| CPU: 3 PID: 517 Comm: Xorg Not tainted 3.10.10-rt7+ #5
| Call Trace:
| [<ffffffff8164b790>] dump_stack+0x19/0x1b
| [<ffffffff8107e62f>] __might_sleep+0xff/0x170
| [<ffffffff81651ac4>] rt_spin_lock+0x24/0x60
| [<ffffffffa0084e67>] i915_read32+0x27/0x170 [i915]
| [<ffffffffa008a591>] i915_pipe_enabled+0x31/0x40 [i915]
| [<ffffffffa008a6be>] i915_get_crtc_scanoutpos+0x3e/0x1b0 [i915]
| [<ffffffffa00245d4>] drm_calc_vbltimestamp_from_scanoutpos+0xf4/0x430 [drm]
| [<ffffffffa008bc95>] i915_get_vblank_timestamp+0x45/0xa0 [i915]
| [<ffffffffa0024998>] drm_get_last_vbltimestamp+0x48/0x70 [drm]
| [<ffffffffa0024db5>] drm_vblank_get+0x185/0x2b0 [drm]
| [<ffffffffa0025d03>] drm_wait_vblank+0x83/0x5d0 [drm]
| [<ffffffffa00212a2>] drm_ioctl+0x552/0x6a0 [drm]
| [<ffffffff811a0095>] do_vfs_ioctl+0x325/0x5b0
| [<ffffffff811a03a1>] SyS_ioctl+0x81/0xa0
| [<ffffffff8165a342>] tracesys+0xdd/0xe2After a longer thread it was decided to drop the preempt_disable()/ enable() invocations which were meant for -RT and Mario Kleiner looks for a replacement.
--- drivers/gpu/drm/drm_irq.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/gpu/drm/drm_irq.c +0 -7
@@ -624,11 +624,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc,* code gets preempted or delayed for some reason. */ for (i =0 ; i <DRM_TIMESTAMP_MAXRETRIES ; i++) { -/* Disable preemption to make it very likely to -* succeed in the first iteration even on PREEMPT_RT kernel. -*/ -preempt_disable (); -/* Get system timestamp before query. */ stime =ktime_get ();
@@ -640,8 +635,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc,if (!drm_timestamp_monotonic) mono_time_offset =ktime_get_monotonic_offset (); -preempt_enable (); -/* Return as no-op if scanout query unsupported or failed. */ if (!(vbl_status &DRM_SCANOUTPOS_VALID )) { DRM_DEBUG("crtc %d : scanoutpos query failed [%d].\n",
Signature · 1 line
1.8.4.rc3
PATCH 7/7 Linux 3.8.13.13-rt25-rc1
In reply to Steven Rostedt3.8.13.13-rt25-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: "Steven Rostedt (Red Hat)" <[email protected]>
--- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
localversion-rt +1 -1
@@ -1 +1 @@ --rt24 +-rt25-rc1
Signature · 1 line
1.8.4.rc3