On Thu, 13 Nov 2008, Tejun Heo wrote:Yeah, I see the problems. Because it would be a change in the semantics of the file handle. Previously it was just an opaque cookie that the kernel stored for the filesystem, not making any assumptions about it (like uniqueness). OK, we can say that if the filesystems wants to implement poll, it has to make the file handle unique. Also now the filesystem (or something) has to deal with races between poll notification and reuse of the file handle (release/open). With a new poll handle we'd have more room to properly deal with these without overloading the file handle with extra requirements. How about this: the poll handle is allocated by the kernel, not by the filesystem. This guarantees uniqueness, so the filesystem cannot get this wrong. Releasing the poll handle is still tricky, there could be various races... only the userspace filesystem knows if it has no outstanding notificiatons on a poll handle, so the release has to come after all outstanding notifications have been ack'ed. Something like this: (userspace <- kernel) <- POLL-request(pollhandle) (alloc handle) -> POLL-reply ... -> POLL-notification(pollhandle) <- POLL-ack ... <- POLL_RELEASE(pollhandle) -> POLL_RELEASE-reply (free handle) Thanks, Miklos --
| Avi Kivity | [PATCH 09/58] KVM: MMU: Respect nonpae pagetable quadrant when zapping ptes |
| Andrew Morton | 2.6.25-rc2-mm1 |
| James Morris | Re: LSM conversion to static interface |
| Eric W. Biederman | Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu |
git: | |
| David Miller | Re: 2.6.25-rc8: FTP transfer errors |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [GIT *] Solos PCI ADSL card update |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
