Re: [issue1771] Restore hysteresis to vm_zeroidle

看板DFBSD_submit作者時間15年前 (2010/05/26 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
:As written I think the patch behaves like this: : :if (zero_state == 0) /* We've not hit the upper limit */ : if (zeroed pages >= high count) /* hit the upper limit */ : zero_state = 1; : return STOP_ZEROING_PAGES; : return KEEP_ZEROING_PAGES; : :if (zero_state == 1) /* We've hit the upper limit before */ : if (zeroed_pages >= LOW MARK) /* Still have free pages; also covers high */ : return STOP_ZEROING_PAGES; : /* We've seen an upper limit; now we're below the lower limit. */ : /* Restore to 0 (not seen high limit) */ : zero_state = 0; : return KEEP_ZEROING_PAGES; : : :What was wrong with this? : :-- vs Well, which bit of code is easier to read? -Matt
文章代碼(AID): #1B_6J2LQ (DFBSD_submit)
文章代碼(AID): #1B_6J2LQ (DFBSD_submit)