On Mon, May 05, 2008 at 11:21:13AM -0500, Jack Steiner wrote:It'd been better to know about this detail earlier, but frankly this is a minor problem, the important thing is we all agree together on the more difficult parts ;). I don't like this solution very much. Nor GRU nor KVM will call mmu_notifier_register inside the mmap_sem protected sections, so I think the default mmu_notifier_register should be smp safe by itself without requiring additional locks to be artificially taken externally (especially because the need for mmap_sem in write mode is a very mmu_notifier internal detail). The interface would change like this: #define MMU_NOTIFIER_REGISTER_MMAP_SEM (1<<0) void mmu_notifier_register(struct mmu_notifier *mn, struct mm_struct *mm, unsigned long mmu_notifier_flags); A third solution is to add: /* * This must can be called instead of mmu_notifier_register after * taking the mmap_sem in write mode (read mode isn't enough). */ void __mmu_notifier_register(struct mmu_notifier *mn, struct mm_struct *mm); Do you still prefer the bitflag or you prefer __mmu_notifier_register. It's ok either ways, except __mmu_notifier_reigster could be removed in a backwards compatible way, the bitflag can't. Sure! In the meantime go ahead this way. Another very minor change I've been thinking about is to make ->release not mandatory. It happens that with KVM ->release isn't strictly required because after mm_users reaches 0, no guest could possibly run anymore. So I'm using ->release only for debugging by placing -1UL in the root shadow pagetable, to be sure ;). So because at least one user won't strictly require ->release being consistent in having all method optional may be nicer. Alternatively we could make them all mandatory and if somebody doesn't need one of the methods it should implement it as a dummy function. Both ways have pros and cons, but they don't make any difference to us in practice. If I've to change the patch for the mmap_sem taken during registration I may as well cleanup this minor bit. Also note the rculist.h patch you sent earlier won't work against mainline so I can't incorporate it in my patchset, Andrew will have to apply it as mmu-notifier-core-mm after incorporating mmu-notifier-core into -mm. Until a new update is released, mmu-notifier-core v15 remains ok for merging, no known bugs, here we're talking about a new and simple feature and a tiny cleanup that nobody can notice anyway. --
| Alex Samad | page swap allocation error/failure in 2.6.25 |
| Bart Van Assche | Re: Integration of SCST in the mainstream Linux kernel |
| Andrea Arcangeli | [PATCH 06 of 11] rwsem contended |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Andy Parkins | svn:externals using git submodules |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| Marcus Griep | [PATCH] git-svn: Make it scream by minimizing temp files |
| Tommi Virtanen | [PATCH] "git shell" won't work, need "git-shell" |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Theo de Raadt | Re: Chatting with developers? Is it soo 1996? |
| Ted Unangst | Re: MAXDSIZ 1GB memory limit for process |
| Richard Stallman | Real men don't attack straw men |
| Denys Fedoryshchenko | Re: thousands of classes, e1000 TX unit hang |
| Suresh Siddha | Re: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state ch... |
| Simon Horman | Re: [PATCH] sendfile() and UDP socket |
| Jeff Garzik | Re: [PATCH] sky2: jumbo frame regression fix |
