tag:blogger.com,1999:blog-6469704299235308349.post8392882130362894324..comments2024-02-09T16:24:46.087+11:00Comments on -ck hacking: BFS 424 testckhttp://www.blogger.com/profile/02904761195451530213noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-6469704299235308349.post-43031065220110979912012-07-11T21:57:42.261+10:002012-07-11T21:57:42.261+10:00Mainline has __schedule() in various functions ins...Mainline has __schedule() in various functions instead of schedule().<br />(preempt_schedule, preempt_schedule_irq, ...)<br />Maybe this is the reason for the freezes.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-58156005161318063522012-07-06T16:59:13.051+10:002012-07-06T16:59:13.051+10:00Fair scheduling means tasks of equal priority are ...Fair scheduling means tasks of equal priority are given equal amounts of CPU time. When there is an overload in progress, the CPU is overcontended and *none* of the tasks will receive the CPU time that they require.<br /><br />As Martin said before: <br /><br />'chen, you probably misunderstand the term fairness. if your interactive task competes with 2*n tasks of the same priority, it only gets n/(2*n+1) cpu time. if you want to favour the interactive task you are actually asking for unfairness.'<br /><br />That is also my understanding of it.<br /><br />BFS is rigidly fair. I don't understand how you can say that a scheduler which *is* completely fair hasn't got the concept of fairness correctly. That statement completely defies logic. It's either fair or it isn't. BFS *is* fair, CFS not so._thalamushttps://www.blogger.com/profile/18195290566480282838noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-18799471787353362092012-07-06T02:39:15.238+10:002012-07-06T02:39:15.238+10:00Fair scheduling means all the task can get appropr...Fair scheduling means all the task can get appropriate time to run.CFS has implement this more correct than BFS. But Ingo has forgot that the algorithm CFS using has done all the works correctly and he added a lot of things similar to O(1) scheduler. These are opposite to the beautiful algorithm CFS using and heavily hurt the interactivity. BFS hasn't get the concept of fair correctly but BFS is simple and BFS can make sure that all the task will be scheduled in a constant time and BFS can be used as a realtime scheduler.Xhttps://www.blogger.com/profile/08096886089147792760noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-5160261765664949662012-07-05T06:57:56.716+10:002012-07-05T06:57:56.716+10:00@Chen: you said "can cause choppy user experi...@Chen: you said "can cause choppy user experience when we are compiling something with CPUx2 threads.It is because the interactive task couldn't take turn to run on CPU as fast as it can." my point was, this is just fair behaviour.<br /><br />@Manuel: fair enough, but it doesn't hurt to run a compiler @ SCHED_IDLEPRIO. I don't mind if a compiler run takes a few seconds longer, but I expect my desktop to remain fully responsive. So I ust give this hint to the scheduler.<br /><br />Btw, on UP machines I do not compile @ SCHED_IDLEPRIO since it starves the compiler too much. I simply compile @ SCHED_NORMAL at nice level 19.Martinhttp://www.frogge.de/noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-55435405456503497612012-07-05T06:08:11.832+10:002012-07-05T06:08:11.832+10:0054h of stable and snappy uptime passed. Manuel54h of stable and snappy uptime passed. ManuelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-35265109906100334082012-07-05T05:54:30.761+10:002012-07-05T05:54:30.761+10:00@X / Chen: The top of unfairness is to not program...@X / Chen: The top of unfairness is to not program your scheduler to also work on uniprocessor machines. If you want to try to improve that CFS, please take this into account, and I'm not the only one with old hardware.<br /><br />@Martin: You don't need to let your compilers run @ SCHED_IDLEPRIO principally. The actual BFS behaves so well, that you would notice stalls in audio/video very rarely (if at all). The only one I have @ this level is the BOINC client, that should never interfere anything else.<br /><br />ManuelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-12690595027399128342012-07-04T08:11:57.169+10:002012-07-04T08:11:57.169+10:00@Martin
Where could you find that I want to favor ...@Martin<br />Where could you find that I want to favor interactive task?<br />I am mentioning that CFS can cause unfairness.<br />Maybe you misread the hole article.<br />BFS is fair but it can also introduce bad desktop experience.(With small load it is good).I am now trying to improve the fairness of CFSXhttps://www.blogger.com/profile/08096886089147792760noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-43300105622394157672012-07-04T06:03:29.730+10:002012-07-04T06:03:29.730+10:00chen, you probably misunderstand the term fairness...chen, you probably misunderstand the term fairness. if your interactive task competes with 2*n tasks of the same priority, it only gets n/(2*n+1) cpu time. if you want to favour the interactive task you are actually asking for unfairness. in the case of BFS you need to introduce unfairness manually.<br /><br />i do it this way: the shells in my xterms are automatically executed in SCHED_IDLEPRIO class, so my compiler runs never interfere with my desktop.Martinhttp://www.frogge.de/noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-41337036062145485092012-07-04T03:10:11.674+10:002012-07-04T03:10:11.674+10:00I don't think the shortcomings of CFS are part...I don't think the shortcomings of CFS are particularly relevant here. Perhaps try LKML, they might be interested.<br /><br />The simple answer to your choppy user experience is to develop some common sense and NOT to compile with twice as many jobs as you have CPUs or if you really *must* use that much overload for some obscure reason, nice -n 19 or SCHED_IDLEPRIO your compile..._thalamushttps://www.blogger.com/profile/18195290566480282838noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-67835184472534109642012-07-04T00:36:02.480+10:002012-07-04T00:36:02.480+10:00Now CFS has improved on make test. However I think...Now CFS has improved on make test. However I think there is a problem with the design of CFS.<br /><br />CFS is a variant of multilevel-feedback queue algorithm. It uses a red-black tree to store the tasks. It is not a deadline design(unlike BFS) and Ingo has missed this point. The task which has the lowest vruntime will be scheduled. Now we have a problem of this algorithm. CFS can cause O(n) lag bound and it is not really fair. Some of the task which sleeps frequently can always take turn to run on CPU.It can cause starvation when IO load is high.Let me describe that how that happen.<br /><br />First a task which always sleeps(Disk IO) can cause starvation because it can always take turn to run and it can always preempt the other tasks.If more IO tasks are running users may feel choppy.<br /><br />BFS is fairer than CFS. But still it can cause choppy user experience when we are compiling something with CPUx2 threads.It is because the interactive task couldn't take turn to run on CPU as fast as it can.<br /> ChenXhttps://www.blogger.com/profile/08096886089147792760noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-1483293170799676322012-07-03T14:06:10.925+10:002012-07-03T14:06:10.925+10:00Thanks everyone for reporting back. I'm about ...Thanks everyone for reporting back. I'm about to release 3.4-ck3 which is purely ck2 with bfs upgraded to this 424 patch unchanged.ckhttps://www.blogger.com/profile/02904761195451530213noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-48101331512053898572012-07-03T06:22:38.887+10:002012-07-03T06:22:38.887+10:00Forget what I've written last night. Lack of c...Forget what I've written last night. Lack of coffee or sth. like that. Shame on me: Probably loose contacts for the middle buttons had caused it.<br />BFS 0.424 behaves very well on here. Unfortunately I decided to reboot (instead of using brute force for the buttons immediately, what helped later on) after 17h uptime.<br /><br />Best regards, ManuelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-14781895857248572862012-07-03T06:13:14.610+10:002012-07-03T06:13:14.610+10:00CK - results from the make test show no difference...CK - results from the make test show no difference between bfs v0.423 and bfs v0.424 which is good. The mainline scheduler was thrown in as a positive control. Interestingly, neither BFS differentiated itself from mainline which is unusual compared to historical data.<br /><br />http://s8.postimage.org/6ocyeg63n/boxplot.jpg<br /><br />Details:<br />1) It is a non-latency based measure.<br />2) Compilation benchmark using gcc to “make bzImage” for a preconfigured linux 3.4.4 build.<br />3) Runs benchmarks 28 times totally to get a decent number of observations for a statistical comparison. In all cases, the first run is omitted leaving an n=27.<br />4) Results are how many seconds it took to compile on a dual Intel E5620 (2x hyperhreaded quadcore CPUs on a single board) @ 2.40 GHz.<br />5) Make is run with 16 threads (8 physical cores and 8 HT cores).grayskyhttps://www.blogger.com/profile/16133632514577609343noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-55144030420117935532012-07-02T11:31:22.633+10:002012-07-02T11:31:22.633+10:00Just woke up in the middle of the night (uptime ~5...Just woke up in the middle of the night (uptime ~5h) and my mouse (trackball) lost its middle mouse button capability like scrolling or pasting. The main two still work (left+right). Never had this before.<br />ManuelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-22770945577242639612012-07-02T11:21:55.608+10:002012-07-02T11:21:55.608+10:00I'll do the standard comparison in my make ben...I'll do the standard comparison in my make benchmark... give me some time.grayskyhttps://www.blogger.com/profile/16133632514577609343noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-1411147577776454712012-07-02T08:37:13.540+10:002012-07-02T08:37:13.540+10:00Link fixed (silly blogger url was autoadded). Than...Link fixed (silly blogger url was autoadded). Thanks guys for testing. This is substantial enough a bugfix for a new official release.ckhttps://www.blogger.com/profile/02904761195451530213noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-19028516311561781872012-07-02T07:26:51.881+10:002012-07-02T07:26:51.881+10:00I also found this way to get that patch. It's ...I also found this way to get that patch. It's now up and running for 1h with 3.4.4. Hope it's stable now.<br />ManuelAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-72726794677021516172012-07-02T04:32:23.933+10:002012-07-02T04:32:23.933+10:00Hi Con,
my problems with the hard freeze on badbl...Hi Con,<br /><br />my problems with the hard freeze on badblocktests are completly gone.<br />Does work on both USB und esata. Thanks. No other problems at the moment.<br />Feels snappy as always.<br /><br />Applied your patch on top of the actual ZEN kernel.<br /><br />Regards Mike<br /><br />PS: Download does not work on the link, but direct http://ck.kolivas.org/patches/bfs/test/bfs423-424.patchMikehttps://www.blogger.com/profile/12391045215046883684noreply@blogger.comtag:blogger.com,1999:blog-6469704299235308349.post-33642695320257086232012-07-02T03:12:00.946+10:002012-07-02T03:12:00.946+10:00Please, upload again. That was no patch.
ManuelPlease, upload again. That was no patch.<br />ManuelAnonymousnoreply@blogger.com