Re: [PATCH] ummunotify: Userspace support for MMU notifications

From: Roland Dreier
Date: Tue Apr 13 2010 - 13:57:45 EST


> I am not sure I agree with the premises here. ptMalloc and malloc
> hooks are not related to the issue in my opinion. User space library
> calls do not change virtual to physical mapping, system calls do. The
> following sys calls might change virtual to physical mapping:
> munmap(), mremap(), sbrk(), madvice(). What we need is glibc to
> provide hooks for these 4 sys calls and the general syscall() when
> its argument is one of the four mentioned syscalls. To me, that is
> what is needed, and the ummunotify direction seems way too
> complicated to me.

Are those system calls the only possible way that virtual to physical
mappings can change? Can't page migration or something like that
potentially affect things? And even if you did have hooks into every
system call that mattered (keep in mind that relying on glibc is not
enough, since an MPI application may not use glibc) would decoding them
and figuring out what happened really be preferable to a single event
type that tells you exactly what address range was affected?

> It is further claimed that "â other tricks are not robust". I wrote
> the code used in Scali/Platform MPI handling the issue. I do not
> think its fair to claim that this MPI is not robust in this matter
> nor that is performance is bad.

The Open MPI developers have spent a lot of effort trying to handle this
purely in userspace and still do not believe that a truly robust
solution is possible without kernel help. Perhaps they can expand on
what the obstacles are.

- R.
--
Roland Dreier <rolandd@xxxxxxxxx> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/