to den 31.03.2005 Klokka 21:09 (+0400) skreiv Nikita Danilov: > > You are assuming that all the waiters on the queue are tasks that must > > sleep if they cannot take the lock. That is not the case here. Whereas > > some users will indeed fall in this category, I expect that most will > > rather want to use the non-blocking mode in which the caller is free to > > go off and do other useful work. > > Ah, I see... But this doesn't look like semaphore _at_ _all_. Semaphores > have no call-backs, and in iosem case it's callback (in the form of > struct work_struct) that is central to the interface. I belive naming should > reflect this, it's utterly confusing as it is. Maybe struct > work_queue_token and schedule_work_{with,end}_token()?
That would be equally confusing. The lock exists to serialize _BOTH_ tasks and work queue items. For instance the NFSv4 OPEN takes the token synchronously, and it needs to be serialized w.r.t. the asynchronous CLOSE or OPEN_DOWNGRADE. Cheers, Trond -- Trond Myklebust <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html