On 05/23/2012 11:04 PM, Christoph Hellwig wrote: >> +void resume_wait_epoch_requests(void) >> +{ >> + struct request *req, *t; >> + >> + /* Request must have result SD_RES_OLD_NODE_VER >> + * or SD_RES_NEW_NODE_VER in sys->wait_epoch_queue. */ >> + list_for_each_entry_safe(req, t, &sys->wait_rw_queue, >> + request_list) { >> + >> + list_del(&req->request_list); >> + list_add_tail(&req->request_list, &sys->request_queue); >> + process_request_event_queues(); >> + } > > I think this should simply use list_splice_tail_init (which still needs > to be ported from the Linux Kernel) to move all entries efficiently in > one go, and then just call process_request_event_queues once. > This's a good idea, I'd try to modify my code. thanks, levin |