tag:blogger.com,1999:blog-6469704299235308349.post1584587414447052404..comments2024-03-28T15:50:13.644+11:00Comments on -ck hacking: BFS 0.413, BFS benchmarks, (and more cksort stuff)ckhttp://www.blogger.com/profile/02904761195451530213noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-6469704299235308349.post-42271135329511672482013-05-28T17:39:29.102+10:002013-05-28T17:39:29.102+10:00Hello, I try to compile kernel 3.9.4 in ubuntu 12....Hello, I try to compile kernel 3.9.4 in ubuntu 12.10 with ck patchset and BFQ but get this error http://pastebin.com/rJSitgZb. Someonbe can help me? ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-60236377832898674762011-11-03T07:55:46.133+11:002011-11-03T07:55:46.133+11:00Nevermind. Only a few files needed some minor twe...Nevermind. Only a few files needed some minor tweaks. This allowed me to build up a kernel just fine.<br /><br />Apply to patch-3.0.0-ck1 - http://pastebin.com/Wy7T8CSggrayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-60717991985971231592011-11-03T07:08:40.132+11:002011-11-03T07:08:40.132+11:00I didn't fix shit apparently :) Thanks for yo...I didn't fix shit apparently :) Thanks for your patch. It compiled up just fine. You said that you have been running with this patch for several weeks. Any ill effects?<br /><br />You manage to patch ck1 to work with 3.1 by chance?grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-58840641434397489602011-11-03T05:40:10.885+11:002011-11-03T05:40:10.885+11:00sorry, i thought that you had fixed those too, her...sorry, i thought that you had fixed those too, here is my patch to be applied to 3.0-sched-bfs-413.patch, although i recommend to wait for ck to post a proper patch.<br /><br />http://pastebin.com/0yBW0k13codestationnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-62218249470659688762011-11-02T07:47:16.984+11:002011-11-02T07:47:16.984+11:00Errors persist upon a make -j4 bzImage
CC ...Errors persist upon a make -j4 bzImage<br /><br /> CC init/do_mounts_initrd.o<br /> CC init/initramfs.o<br />In file included from kernel/sched.c:2:0:<br />kernel/sched_bfs.c: In function ‘set_task_cpu’:<br />kernel/sched_bfs.c:1014:3: warning: passing argument 3 of ‘perf_sw_event’ makes pointer from integer without a cast [enabled by default]<br />include/linux/perf_event.h:1049:1: note: expected ‘struct pt_regs *’ but argument is of type ‘int’<br />kernel/sched_bfs.c:1014:3: warning: passing argument 4 of ‘perf_sw_event’ makes integer from pointer without a cast [enabled by default]<br />include/linux/perf_event.h:1049:1: note: expected ‘u64’ but argument is of type ‘void *’<br />kernel/sched_bfs.c:1014:3: error: too many arguments to function ‘perf_sw_event’<br />include/linux/perf_event.h:1049:1: note: declared here<br />kernel/sched_bfs.c: In function ‘finish_task_switch’:<br />kernel/sched_bfs.c:1876:2: error: too few arguments to function ‘perf_event_task_sched_in’<br />include/linux/perf_event.h:1064:20: note: declared here<br />kernel/sched_bfs.c: In function ‘sched_init’:<br />kernel/sched_bfs.c:6900:2: error: implicit declaration of function ‘plist_head_init_raw’ [-Werror=implicit-function-declaration]<br />cc1: some warnings being treated as errors<br /><br />make[1]: *** [kernel/sched.o] Error 1<br />make: *** [kernel] Error 2<br />make: *** Waiting for unfinished jobs....grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-34356217077045307202011-11-02T07:15:29.437+11:002011-11-02T07:15:29.437+11:00Jeeze - I'm so stupid, it's in ck's pa...Jeeze - I'm so stupid, it's in ck's patch itself!grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-61045067856421030352011-11-02T07:12:48.027+11:002011-11-02T07:12:48.027+11:00@codestation - can't find that line in the fil...@codestation - can't find that line in the file you mentioned. I can't find it in the 3.1 tree anywhere!<br /><br />$ find include/linux -type f -exec grep "fs_excl" {} \; -print<br /><br />or<br /><br />$ find include/linux -type f -exec grep "ATOMIC_INIT(0)," {} \; -print<br /> .flushing = ATOMIC_INIT(0), \<br />include/linux/kthread.h<br />struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }<br />include/linux/interrupt.hgrayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-9769463210839853572011-11-02T02:37:15.109+11:002011-11-02T02:37:15.109+11:00@graysky
edit include/linux/init_task.h and remov...@graysky<br /><br />edit include/linux/init_task.h and remove the:<br />".fs_excl = ATOMIC_INIT(0),"<br /><br />after patching. Looks like this part of the struct was removed on 3.1. I am using bfs on 3.1.0-rc9 since 2 weeks ago and haven't been hit with a kernel bug yet.codestationnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-66941059557589246552011-11-01T06:03:04.692+11:002011-11-01T06:03:04.692+11:00Tried to update 3.0-sched-bfs-413.patch myself and...Tried to update 3.0-sched-bfs-413.patch myself and noticed that if you remove the section of the patch that corrects the documentation, the only part that gets rejected is the same bit that stopped 3.0.7 from working, namely:<br /><br />remove: times->sum_exec_runtime += t->se.sum_exec_runtime;<br />replace with: times->sum_exec_runtime += tsk_seruntime(t);<br /><br />When I made this modification to the 3.0-sched-bfs-413.patch and tried to build against the patched 3.1 tree, I got some errors upon my "make -j4 bzImage"<br /><br />...<br /><br /> CC arch/x86/kernel/mmconf-fam10h_64.o<br /> CC arch/x86/kernel/vsmp_64.o<br /> AS arch/x86/kernel/head_64.o<br /> CC mm/page_io.o<br /> CC arch/x86/kernel/head64.o<br /> CC arch/x86/kernel/head.o<br /> CC arch/x86/kernel/init_task.o<br /> LDS arch/x86/kernel/vmlinux.lds<br /> CC mm/swap_state.o<br /> LD arch/x86/kernel/built-in.o<br /> CC mm/swapfile.o<br /> CC mm/thrash.o<br />arch/x86/kernel/init_task.c:31:8: error: unknown field ‘fs_excl’ specified in initializer<br />arch/x86/kernel/init_task.c:31:8: warning: braces around scalar initializer [enabled by default]<br />arch/x86/kernel/init_task.c:31:8: warning: (near initialization for ‘init_task.real_cred’) [enabled by default]<br />make[2]: *** [arch/x86/kernel/init_task.o] Error 1<br />make[1]: *** [arch/x86/kernel] Error 2<br />make: *** [arch/x86] Error 2<br /> CC mm/dmapool.o<br /> CC mm/hugetlb.o<br /> CC mm/mempolicy.o<br /> CC mm/sparse.o<br /> CC mm/sparse-vmemmap.o<br /> CC mm/compaction.o<br /> CC mm/mmu_notifier.o<br /> CC mm/ksm.o<br /> CC mm/slub.o<br /> CC mm/memory_hotplug.o<br /> CC mm/migrate.o<br /> CC mm/huge_memory.o<br /> CC mm/memcontrol.o<br /> CC mm/page_cgroup.o<br /> CC mm/memory-failure.o<br /> CC mm/cleancache.o<br /> LD mm/built-in.o<br /><br />I'm guessing this isn't a quick fix for ck? Perhaps a new revision of bfs?grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-62371236701204230282011-10-29T00:10:16.801+11:002011-10-29T00:10:16.801+11:00When we are gonna see BFS for 3.1When we are gonna see BFS for 3.1Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-28290603947906716592011-10-25T22:45:14.155+11:002011-10-25T22:45:14.155+11:003.1 is out... ;)3.1 is out... ;)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-19439447357354299212011-10-23T23:09:23.373+11:002011-10-23T23:09:23.373+11:00I ran ubuntu/debian a few years ago and compiled u...I ran ubuntu/debian a few years ago and compiled up my own kernels following this guide: http://technowizah.com/2005/12/debian-how-to-custom-kernel-compile.htmlgrayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-6082679175769156062011-10-23T16:32:43.827+11:002011-10-23T16:32:43.827+11:00@ Mau~x:
There are many floating around... e.g. yo...@ Mau~x:<br />There are many floating around... e.g. you can find them in user-created Ubuntu PPAs, but since configs are based on their author's preferences / (in)experience, I'd consider compiling your own.<br />Anyway if you want to try you can find one for kernel 3.0 at https://launchpad.net/~chogydan/+archive/ppa<br />or you can try PCLinuxOS, a distro that has bfs already built in the kernel.Rennoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-53529557246465692472011-10-23T12:09:12.720+11:002011-10-23T12:09:12.720+11:00is there any kernel patched with bfs for Ubuntu 11...is there any kernel patched with bfs for Ubuntu 11.10?Mauhttps://www.blogger.com/profile/11580086253588321814noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-88499763938660051402011-10-22T23:35:35.015+11:002011-10-22T23:35:35.015+11:00Thanks for the explanation.Thanks for the explanation.grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-649437368165670092011-10-22T22:21:44.171+11:002011-10-22T22:21:44.171+11:00These are C preprocessor directives, not comments....These are C preprocessor directives, not comments. In C, lines beginning with # aren't comments. This isn't a shell script :-)Anonymoushttps://www.blogger.com/profile/11469174621439712081noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-17489892426532812692011-10-22T20:02:08.854+11:002011-10-22T20:02:08.854+11:00RealNC- I understand the construct of the statemen...RealNC- I understand the construct of the statement, but didn't think that it would be applied since it was commented out.grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-4816932933931316492011-10-22T16:01:51.916+11:002011-10-22T16:01:51.916+11:00If CONFIG_SCHED_BFS is enabled in the kernel confi...If CONFIG_SCHED_BFS is enabled in the kernel config, tsk_seruntime() will be used. Otherwise, task_sched_runtime().Anonymoushttps://www.blogger.com/profile/11469174621439712081noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-16412366859087078292011-10-22T05:56:07.131+11:002011-10-22T05:56:07.131+11:00Thanks for the patch and for the explanation, Real...Thanks for the patch and for the explanation, RealNC. I'm no programmer so the extra commented lines in your patch confuse me. What is their significance?<br /><br />CK - can you "sign off" on RNC's patch as kosher for the bfs?grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-84385691250608232122011-10-21T20:24:01.314+11:002011-10-21T20:24:01.314+11:00BFS is using t->sched_time() instead of t->s...BFS is using t->sched_time() instead of t->se.sum_exec_runtime(), so whatever bug there was in sum_exec_runtime() was probably not affecting BFS to begin with. Changing it to use task_sched_runtime() doesn't look right to me, since BFS does sub-tick accounting of tasks and it looks like this is one of the places where this happens.<br /><br />The patch against 3.0-sched-bfs-413.patch:<br /><br /><a href="http://pastebin.com/raw.php?i=LBx1r4fX" rel="nofollow">http://pastebin.com/raw.php?i=LBx1r4fX</a>Anonymoushttps://www.blogger.com/profile/11469174621439712081noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-58409618346401303822011-10-21T19:38:15.208+11:002011-10-21T19:38:15.208+11:00What are you suggesting the line gets change to?What are you suggesting the line gets change to?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-12248613507336086782011-10-21T11:18:24.471+11:002011-10-21T11:18:24.471+11:00IMO, the correct (but probably still quick'n&#...IMO, the correct (but probably still quick'n'dirty) way is:<br /><br />(Damn, blogspot doesn't allow the CODE HTML tag.)<br /><br />#ifdef CONFIG_SCHED_BFS<br /> times->sum_exec_runtime += tsk_seruntime(t);<br />#else<br /> times->sum_exec_runtime += task_sched_runtime(t);<br />#endif<br /><br />That's because tsk_seruntime() is a macro defined as ((t)->sched_time) on BFS and ((t)->se.sum_exec_runtime) on CFS.Anonymoushttps://www.blogger.com/profile/11469174621439712081noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-16503228172723421872011-10-21T07:51:22.929+11:002011-10-21T07:51:22.929+11:00Dammit, I messed up my previous post. To boil it ...Dammit, I messed up my previous post. To boil it down. Which of the following 2 potential patches to bfs is correct given upstream's change to this file?<br /><br />http://www.spinics.net/lists/stable-commits/msg13688.html<br /><br />Here is patched version #1 of your bfs v0.413, HUNK #1<br /><br />Index: linux-3.0.0-bfs/kernel/posix-cpu-timers.c<br />===================================================================<br />--- linux-3.0.0-bfs.orig/kernel/posix-cpu-timers.c 2011-09-24 13:23:32.801284829 +1000<br />+++ linux-3.0.0-bfs/kernel/posix-cpu-timers.c 2011-09-24 13:29:06.497284777 +1000<br />@@ -250,7 +250,7 @@ void thread_group_cputime(struct task_st<br /> do {<br /> times->utime = cputime_add(times->utime, t->utime);<br /> times->stime = cputime_add(times->stime, t->stime);<br />- times->sum_exec_runtime += task_sched_runtime(t);<br /><b>+ times->sum_exec_runtime += tsk_seruntime(t);</b><br /> } while_each_thread(tsk, t);<br /> out:<br /> rcu_read_unlock();<br /><br />Here is patched version #2 of your bfs v0.413, HUNK #1<br /><br />Index: linux-3.0.0-bfs/kernel/posix-cpu-timers.c<br />===================================================================<br />--- linux-3.0.0-bfs.orig/kernel/posix-cpu-timers.c 2011-09-24 13:23:32.801284829 +1000<br />+++ linux-3.0.0-bfs/kernel/posix-cpu-timers.c 2011-09-24 13:29:06.497284777 +1000<br />@@ -250,7 +250,7 @@ void thread_group_cputime(struct task_st<br /> do {<br /> times->utime = cputime_add(times->utime, t->utime);<br /> times->stime = cputime_add(times->stime, t->stime);<br />- times->sum_exec_runtime += task_sched_runtime(t);<br /><b>+ times->sum_exec_runtime += task_sched_runtime(t);</b><br /> } while_each_thread(tsk, t);<br /> out:<br /> rcu_read_unlock();grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-71836555670863868842011-10-21T06:58:38.516+11:002011-10-21T06:58:38.516+11:00Hi Con - can you make a ruling for me? There are ...Hi Con - can you make a ruling for me? There are two different patches that seem to work for linux-3.0.6 + bfs v0.413 and I am wondering which is more appropriate given up stream's change and your original bfs v0.314.<br /><br />Here is upstream with the bolded line being what's new from v3.0.6<br />http://www.spinics.net/lists/stable-commits/msg13688.html<br /><br />kernel/posix-cpu-timers.c<br />...around line 244...<br /><br />rcu_read_lock();<br />/* make sure we can trust tsk->thread_group list */<br />if (!likely(pid_alive(tsk)))<br />goto out;<br /><br />t = tsk;<br />do {<br />times->utime = cputime_add(times->utime, t->utime);<br /><i>times->stime = cputime_add(times->stime, t->stime);</i><br /><b>times->sum_exec_runtime += task_sched_runtime(t);</b><br />} while_each_thread(tsk, t);<br />out:<br />rcu_read_unlock();<br /><br />Your bfs wants to remove the italic line and replace is with "times->sum_exec_runtime += tsk_seruntime(t);"<br /><br />So my question for you is, which is the correct line?<br /><br />Upstream: times->sum_exec_runtime += task_sched_runtime(t);<br />BFS v0.413: times->sum_exec_runtime += tsk_seruntime(t);<br /><br />Intentionally cross-posted to your blog so others and learn from your recommendation.grayskyhttp://repo-ck.comnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-74203199237697854582011-10-20T20:29:44.550+11:002011-10-20T20:29:44.550+11:00Is anyone willing to put up .debs for Ubuntu 11.10...Is anyone willing to put up .debs for Ubuntu 11.10?Anonymousnoreply@blogger.com