Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread manish.mishra
On 26/04/23 5:35 pm, Juan Quintela wrote: "manish.mishra" wrote: On 26/04/23 4:35 pm, Juan Quintela wrote: "manish.mishra" wrote: On 26/04/23 3:58 pm, Juan Quintela wrote: Before: while (true) { sem_post(channels_ready) } And you want to add to the initialization a coun

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread Juan Quintela
"manish.mishra" wrote: > On 26/04/23 4:35 pm, Juan Quintela wrote: >> "manish.mishra" wrote: >>> On 26/04/23 3:58 pm, Juan Quintela wrote: >> Before: >> >> while (true) { >> >> sem_post(channels_ready) >> } >> >> And you want to add to the initialization a counter equal to the num

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread manish.mishra
On 26/04/23 4:35 pm, Juan Quintela wrote: "manish.mishra" wrote: On 26/04/23 3:58 pm, Juan Quintela wrote: "manish.mishra" wrote: multifd_send_sync_main() posts request on the multifd channel but does not call sem_wait() on channels_ready semaphore, making the channels_ready semaphore coun

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread Juan Quintela
"manish.mishra" wrote: > On 26/04/23 3:58 pm, Juan Quintela wrote: >> "manish.mishra" wrote: >>> multifd_send_sync_main() posts request on the multifd channel >>> but does not call sem_wait() on channels_ready semaphore, making >>> the channels_ready semaphore count keep increasing. >>> As a resu

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread manish.mishra
On 26/04/23 3:58 pm, Juan Quintela wrote: "manish.mishra" wrote: multifd_send_sync_main() posts request on the multifd channel but does not call sem_wait() on channels_ready semaphore, making the channels_ready semaphore count keep increasing. As a result, sem_wait() on channels_ready in mult

Re: [PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-26 Thread Juan Quintela
"manish.mishra" wrote: > multifd_send_sync_main() posts request on the multifd channel > but does not call sem_wait() on channels_ready semaphore, making > the channels_ready semaphore count keep increasing. > As a result, sem_wait() on channels_ready in multifd_send_pages() > is always non-blocki

[PATCH] multifd: Avoid busy-wait in multifd_send_pages()

2023-04-25 Thread manish.mishra
multifd_send_sync_main() posts request on the multifd channel but does not call sem_wait() on channels_ready semaphore, making the channels_ready semaphore count keep increasing. As a result, sem_wait() on channels_ready in multifd_send_pages() is always non-blocking hence multifd_send_pages() keep