* [PATCH] kernel: async: Fixed the wrong waitting condition of wait_event [not found] <async> @ 2015-01-05 3:35 ` Chunyan Zhang 2015-01-08 0:37 ` Andrew Morton 2015-01-08 0:39 ` Andrew Morton 0 siblings, 2 replies; 4+ messages in thread From: Chunyan Zhang @ 2015-01-05 3:35 UTC (permalink / raw) To: akpm, ionut.m.alexa, mark.yang, wei.qiao, geng.ren Cc: orson.zhai, zhizhou.zhang, ke.wang, zhang.lyra, linux-kernel From: Yonghui Yang <mark.yang@spreadtrum.com> This patch changes the waitting condition of wait_event in the function 'async_synchronize_cookie_domain'. This function waits until all asynchronous function calls for the certain domain have been done. But, the function 'lowest_in_progress' returns the lowest *pending* entry's cookie. So we should make sure that the return value of lowest_in_progress(domain) must be larger than @cookie. Verified-by: Wei Qiao <wei.qiao@spreadtrum.com> Signed-off-by: Yonghui Yang <mark.yang@spreadtrum.com> Signed-off-by: Geng Ren <geng.ren@spreadtrum.com> Signed-off-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com> --- kernel/async.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/async.c b/kernel/async.c index 4c3773c..894ae80 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -267,7 +267,7 @@ EXPORT_SYMBOL_GPL(async_unregister_domain); */ void async_synchronize_full_domain(struct async_domain *domain) { - async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, domain); + async_synchronize_cookie_domain(ASYNC_COOKIE_MAX-1, domain); } EXPORT_SYMBOL_GPL(async_synchronize_full_domain); @@ -289,7 +289,7 @@ void async_synchronize_cookie_domain(async_cookie_t cookie, struct async_domain starttime = ktime_get(); } - wait_event(async_done, lowest_in_progress(domain) >= cookie); + wait_event(async_done, lowest_in_progress(domain) > cookie); if (initcall_debug && system_state == SYSTEM_BOOTING) { endtime = ktime_get(); -- 1.7.9.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kernel: async: Fixed the wrong waitting condition of wait_event 2015-01-05 3:35 ` [PATCH] kernel: async: Fixed the wrong waitting condition of wait_event Chunyan Zhang @ 2015-01-08 0:37 ` Andrew Morton 2015-01-08 0:39 ` Andrew Morton 1 sibling, 0 replies; 4+ messages in thread From: Andrew Morton @ 2015-01-08 0:37 UTC (permalink / raw) To: Chunyan Zhang Cc: ionut.m.alexa, mark.yang, wei.qiao, geng.ren, orson.zhai, zhizhou.zhang, ke.wang, zhang.lyra, linux-kernel On Mon, 5 Jan 2015 11:35:35 +0800 Chunyan Zhang <chunyan.zhang@spreadtrum.com> wrote: > This patch changes the waitting condition of wait_event in the > function 'async_synchronize_cookie_domain'. > > This function waits until all asynchronous function calls for the certain > domain have been done. > > But, the function 'lowest_in_progress' returns the lowest *pending* > entry's cookie. > > So we should make sure that the return value of lowest_in_progress(domain) > must be larger than @cookie. I'm having runtime problems with this. Twice the kernel silently hangs late in initcalls and the third time I got a great stream of oopses. I'll drop it. Hopefully you'll be able to work through the bug with Arjan and Tajun. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kernel: async: Fixed the wrong waitting condition of wait_event 2015-01-05 3:35 ` [PATCH] kernel: async: Fixed the wrong waitting condition of wait_event Chunyan Zhang 2015-01-08 0:37 ` Andrew Morton @ 2015-01-08 0:39 ` Andrew Morton 2015-01-08 6:20 ` Chunyan Zhang (张春艳) 1 sibling, 1 reply; 4+ messages in thread From: Andrew Morton @ 2015-01-08 0:39 UTC (permalink / raw) To: Chunyan Zhang Cc: ionut.m.alexa, mark.yang, wei.qiao, geng.ren, orson.zhai, zhizhou.zhang, ke.wang, zhang.lyra, linux-kernel, Arjan van de Ven, Tejun Heo (resend with cc's, sorry) On Mon, 5 Jan 2015 11:35:35 +0800 Chunyan Zhang <chunyan.zhang@spreadtrum.com> wrote: > This patch changes the waitting condition of wait_event in the > function 'async_synchronize_cookie_domain'. > > This function waits until all asynchronous function calls for the certain > domain have been done. > > But, the function 'lowest_in_progress' returns the lowest *pending* > entry's cookie. > > So we should make sure that the return value of lowest_in_progress(domain) > must be larger than @cookie. I'm having runtime problems with this. Twice the kernel silently hangs late in initcalls and the third time I got a great stream of oopses. I'll drop it. Hopefully you'll be able to work through the bug with Arjan and Tejun. ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] kernel: async: Fixed the wrong waitting condition of wait_event 2015-01-08 0:39 ` Andrew Morton @ 2015-01-08 6:20 ` Chunyan Zhang (张春艳) 0 siblings, 0 replies; 4+ messages in thread From: Chunyan Zhang (张春艳) @ 2015-01-08 6:20 UTC (permalink / raw) To: Andrew Morton Cc: ionut.m.alexa, Mark Yang (杨永辉), Wei Qiao (乔伟), Geng Ren (任赓), Orson Zhai (翟京), Zhizhou Zhang (张治洲), Ke Wang (王科), zhang.lyra, linux-kernel, Arjan van de Ven, Tejun Heo [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1021 bytes --] Hi, Andrew Could you give us the test log including the runtime problems you've got? Thank you so much. Best regards Chunyan On Mon, 5 Jan 2015 11:35:35 +0800 Chunyan Zhang <chunyan.zhang@spreadtrum.com> wrote: > This patch changes the waitting condition of wait_event in the > function 'async_synchronize_cookie_domain'. > > This function waits until all asynchronous function calls for the certain > domain have been done. > > But, the function 'lowest_in_progress' returns the lowest *pending* > entry's cookie. > > So we should make sure that the return value of lowest_in_progress(domain) > must be larger than @cookie. I'm having runtime problems with this. Twice the kernel silently hangs late in initcalls and the third time I got a great stream of oopses. I'll drop it. Hopefully you'll be able to work through the bug with Arjan and Tejun. ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-08 6:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <async>
2015-01-05 3:35 ` [PATCH] kernel: async: Fixed the wrong waitting condition of wait_event Chunyan Zhang
2015-01-08 0:37 ` Andrew Morton
2015-01-08 0:39 ` Andrew Morton
2015-01-08 6:20 ` Chunyan Zhang (张春艳)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®