[sheepdog] [PATCH v2 1/7] sheep: make requests with new epoch sleep until epoch is updated
levin li
levin108 at gmail.com
Thu May 24 04:18:28 CEST 2012
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
More information about the sheepdog
mailing list