* Jason Low wrote: > On Mon, 2014-04-28 at 15:45 -0700, Jason Low wrote: > > Currently, in idle_balance(), we update rq->next_balance when we pull_tasks. > > However, it is also important to update this in the !pulled_tasks case too. > > > > When the CPU is "busy" (the CPU isn't idle), rq->next_balance gets computed > > using sd->busy_factor (so we increase the balance interval when the CPU is > > busy). However, when the CPU goes idle, rq->next_balance could still be set > > to a large value that was computed with the sd->busy_factor. > > > > Thus, we need to also update rq->next_balance in idle_balance() in the cases > > where !pulled_tasks too, so that rq->next_balance gets updated without taking > > the busy_factor into account when the CPU is about to go idle. > > > > This patch makes rq->next_balance get updated independently of whether or > > not we pulled_task. Also, we add logic to ensure that we always traverse > > at least 1 of the sched domains to get a proper next_balance value for > > updating rq->next_balance. > > > > Additionally, since load_balance() modifies the sd->balance_interval, we > > need to re-obtain the sched domain's interval after the call to > > load_balance() in rebalance_domains() before we update rq->next_balance. > > > > This patch adds and uses 2 new helper functions, update_next_balance() and > > get_sd_balance_interval() to update next_balance and obtain the sched > > domain's balance_interval. > > > Hi Peter, > > I noticed that patch 1 is in tip, but not this patch 2. I was wondering > what the current status with this [PATCH 2/2] is at the moment. It was crashing the bootup with the attached config, it gave the splat attached below. (ignore the line duplication, it's a serial logging artifact.) Thanks, Ingo EXT3-fs (sda1): write access will be enabled during recovery EXT3-fs (sda1): write access will be enabled during recovery BUG: unable to handle kernel BUG: unable to handle kernel NULL pointer dereferenceNULL pointer dereference at 00000048 at 00000048 IP:IP: [<7905dbbe>] pick_next_task_fair+0x1ae/0x480 [<7905dbbe>] pick_next_task_fair+0x1ae/0x480 *pde = 00000000 *pde = 00000000 Oops: 0000 [#1] Oops: 0000 [#1] SMP SMP Modules linked in:Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.15.0-rc4-01965-g80afea9-dirty #234750 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.15.0-rc4-01965-g80afea9-dirty #234750 Hardware name: System manufacturer System Product Name/A8N-E, BIOS ASUS A8N-E ACPI BIOS Revision 1008 08/22/2005 Hardware name: System manufacturer System Product Name/A8N-E, BIOS ASUS A8N-E ACPI BIOS Revision 1008 08/22/2005 task: 90848000 ti: 90850000 task.ti: 90850000 task: 90848000 ti: 90850000 task.ti: 90850000 EIP: 0060:[<7905dbbe>] EFLAGS: 00010082 CPU: 0 EIP: 0060:[<7905dbbe>] EFLAGS: 00010082 CPU: 0 EIP is at pick_next_task_fair+0x1ae/0x480 EIP is at pick_next_task_fair+0x1ae/0x480 EAX: 00000001 EBX: 00000000 ECX: 90848484 EDX: 00000000 EAX: 00000001 EBX: 00000000 ECX: 90848484 EDX: 00000000 ESI: 00000000 EDI: 97fdd480 EBP: 90851b20 ESP: 90851adc ESI: 00000000 EDI: 97fdd480 EBP: 90851b20 ESP: 90851adc DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 CR0: 8005003b CR2: 00000048 CR3: 020fb000 CR4: 00000690 CR0: 8005003b CR2: 00000048 CR3: 020fb000 CR4: 00000690 Stack: Stack: 00000002 00000002 00000000 00000000 00000000 00000000 7905db8b 7905db8b 90848000 90848000 7a0ee480 7a0ee480 90848000 90848000 79b49f00 79b49f00 00000000 00000000 790539a2 790539a2 00000001 00000001 ffff30df ffff30df 00000000 00000000 02039687 02039687 97fdd480 97fdd480 00000000 00000000 9084824c 9084824c 90851b9c 90851b9c 79b3c7b0 79b3c7b0 00468017 00468017 00000000 00000000 02039687 02039687 90848000 90848000 00000000 00000000 Call Trace: Call Trace: [<7905db8b>] ? pick_next_task_fair+0x17b/0x480 [<7905db8b>] ? pick_next_task_fair+0x17b/0x480 [<790539a2>] ? dequeue_task+0x22/0x30 [<790539a2>] ? dequeue_task+0x22/0x30 [<79b3c7b0>] __schedule+0x210/0x550 [<79b3c7b0>] __schedule+0x210/0x550 [<79068c99>] ? mark_held_locks+0x69/0x80 [<79068c99>] ? mark_held_locks+0x69/0x80 [<79b400c5>] ? _raw_spin_unlock_irqrestore+0x45/0x50 [<79b400c5>] ? _raw_spin_unlock_irqrestore+0x45/0x50 [<79068deb>] ? trace_hardirqs_on+0xb/0x10 [<79068deb>] ? trace_hardirqs_on+0xb/0x10 [<790b5210>] ? wait_on_page_read+0x40/0x40 [<790b5210>] ? wait_on_page_read+0x40/0x40 [<79b3cdc5>] io_schedule+0x85/0xa0 [<79b3cdc5>] io_schedule+0x85/0xa0 [<790b5218>] sleep_on_page+0x8/0x10 [<790b5218>] sleep_on_page+0x8/0x10 [<79b3cffc>] __wait_on_bit+0x3c/0x70 [<79b3cffc>] __wait_on_bit+0x3c/0x70 [<790b5210>] ? wait_on_page_read+0x40/0x40 [<790b5210>] ? wait_on_page_read+0x40/0x40 [<790b5066>] wait_on_page_bit+0x86/0xa0 [<790b5066>] wait_on_page_bit+0x86/0xa0 [<79062590>] ? autoremove_wake_function+0x40/0x40 [<79062590>] ? autoremove_wake_function+0x40/0x40 [<790b5107>] filemap_fdatawait_range+0x87/0x150 [<790b5107>] filemap_fdatawait_range+0x87/0x150 [<790b6103>] filemap_fdatawait+0xc3/0xd0 [<790b6103>] filemap_fdatawait+0xc3/0xd0 [<790b6f24>] ? filemap_write_and_wait+0x44/0x80 [<790b6f24>] ? filemap_write_and_wait+0x44/0x80 [<790b6f24>] filemap_write_and_wait+0x44/0x80 [<790b6f24>] filemap_write_and_wait+0x44/0x80 [<7911edc5>] __sync_blockdev+0x25/0x50 [<7911edc5>] __sync_blockdev+0x25/0x50 [<7911edfd>] sync_blockdev+0xd/0x10 [<7911edfd>] sync_blockdev+0xd/0x10 [<791bdbf8>] journal_recover+0x168/0x1b0 [<791bdbf8>] journal_recover+0x168/0x1b0 [<791c0e87>] journal_load+0x47/0x80 [<791c0e87>] journal_load+0x47/0x80 [<79176589>] ext3_fill_super+0xff9/0x1910 [<79176589>] ext3_fill_super+0xff9/0x1910 [<790f0001>] ? get_empty_filp+0xb1/0x1c0 [<790f0001>] ? get_empty_filp+0xb1/0x1c0 [<79175590>] ? ext3_setup_super+0x220/0x220 [<79175590>] ? ext3_setup_super+0x220/0x220 [<790f1459>] mount_bdev+0x139/0x1a0 [<790f1459>] mount_bdev+0x139/0x1a0 [<79175590>] ? ext3_setup_super+0x220/0x220 [<79175590>] ? ext3_setup_super+0x220/0x220 [<79172fca>] ext3_mount+0x1a/0x20 [<79172fca>] ext3_mount+0x1a/0x20 [<79175590>] ? ext3_setup_super+0x220/0x220 [<79175590>] ? ext3_setup_super+0x220/0x220 [<790f1ce3>] mount_fs+0x63/0xe0 [<790f1ce3>] mount_fs+0x63/0xe0 [<790cd8ea>] ? __alloc_percpu+0xa/0x10 [<790cd8ea>] ? __alloc_percpu+0xa/0x10 [<7910a00f>] vfs_kern_mount+0x4f/0x120 [<7910a00f>] vfs_kern_mount+0x4f/0x120 [<7910c9cf>] do_mount+0x7cf/0x940 [<7910c9cf>] do_mount+0x7cf/0x940 [<790c9a9c>] ? strndup_user+0x2c/0xb0 [<790c9a9c>] ? strndup_user+0x2c/0xb0 [<7910cddb>] SyS_mount+0x8b/0xd0 [<7910cddb>] SyS_mount+0x8b/0xd0 [<7a070dbc>] mount_block_root+0xe0/0x25d [<7a070dbc>] mount_block_root+0xe0/0x25d [<7a070f94>] mount_root+0x5b/0x61 [<7a070f94>] mount_root+0x5b/0x61 [<7a0710ab>] prepare_namespace+0x111/0x14b [<7a0710ab>] prepare_namespace+0x111/0x14b [<7a070c08>] kernel_init_freeable+0x17f/0x18c [<7a070c08>] kernel_init_freeable+0x17f/0x18c [<7a070522>] ? do_early_param+0x7a/0x7a [<7a070522>] ? do_early_param+0x7a/0x7a [<79b2c13b>] kernel_init+0xb/0xe0 [<79b2c13b>] kernel_init+0xb/0xe0 [<79b40801>] ret_from_kernel_thread+0x21/0x30 [<79b40801>] ret_from_kernel_thread+0x21/0x30 [<79b2c130>] ? rest_init+0xb0/0xb0 [<79b2c130>] ? rest_init+0xb0/0xb0 Code:Code: 79 79 c7 c7 44 44 24 24 0c 0c 8b 8b db db 05 05 79 79 c7 c7 44 44 24 24 08 08 00 00 00 00 00 00 00 00 c7 c7 44 44 24 24 04 04 00 00 00 00 00 00 00 00 c7 c7 04 04 24 24 02 02 00 00 00 00 00 00 e8 e8 98 98 d0 d0 00 00 00 00 8b 8b 9f 9f a4 a4 04 04 00 00 00 00 <8b> <8b> 43 43 48 48 e8 e8 1a 1a 9c 9c fd fd ff ff 85 85 c0 c0 75 75 02 02 b0 b0 01 01 8b 8b 15 15 98 98 b9 b9 06 06 7a 7a 39 39 EIP: [<7905dbbe>] EIP: [<7905dbbe>] pick_next_task_fair+0x1ae/0x480pick_next_task_fair+0x1ae/0x480 SS:ESP 0068:90851adc