* [GIT PULL] uprobes: tmpfs support
@ 2014-06-02 14:14 Oleg Nesterov
2014-06-02 18:30 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Oleg Nesterov @ 2014-06-02 14:14 UTC (permalink / raw)
To: Ingo Molnar
Cc: Denys Vlasenko, Hugh Dickins, Jim Keniston, Masami Hiramatsu,
Srikar Dronamraju, linux-kernel
Ingo, please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc uprobes/core
Based on tip:perf/uprobes
Usually I try to accumulate more changes before I ask to pull, but v3.15
is close and it would be nice to merge the tmpfs fix too. Plus a purely
cosmetic change I promised to do when we discussed the x86 changes.
Oleg Nesterov (3):
uprobes: Shift ->readpage check from __copy_insn() to uprobe_register()
uprobes: Teach copy_insn() to support tmpfs
uprobes/x86: Rename arch_uprobe->def to ->dflt, minor comment updates
arch/x86/include/asm/uprobes.h | 2 +-
arch/x86/kernel/uprobes.c | 37 ++++++++++++++++++-------------------
kernel/events/uprobes.c | 17 +++++++++++------
3 files changed, 30 insertions(+), 26 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] uprobes: tmpfs support
2014-06-02 14:14 [GIT PULL] uprobes: tmpfs support Oleg Nesterov
@ 2014-06-02 18:30 ` Christoph Hellwig
2014-06-02 19:09 ` Hugh Dickins
2014-06-02 19:23 ` Oleg Nesterov
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2014-06-02 18:30 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Ingo Molnar, Denys Vlasenko, Hugh Dickins, Jim Keniston,
Masami Hiramatsu, Srikar Dronamraju, linux-kernel
On Mon, Jun 02, 2014 at 04:14:06PM +0200, Oleg Nesterov wrote:
> Ingo, please pull from
>
> git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc uprobes/core
>
> Based on tip:perf/uprobes
Eww, adding tmpfs-specific code to uprobes screams layering violation.
Hugh, what is the problem with implementing ->readpage for tmpfs again?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] uprobes: tmpfs support
2014-06-02 18:30 ` Christoph Hellwig
@ 2014-06-02 19:09 ` Hugh Dickins
2014-06-02 19:23 ` Oleg Nesterov
1 sibling, 0 replies; 4+ messages in thread
From: Hugh Dickins @ 2014-06-02 19:09 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Oleg Nesterov, Ingo Molnar, Denys Vlasenko, Hugh Dickins,
Jim Keniston, Masami Hiramatsu, Srikar Dronamraju, linux-kernel
On Mon, 2 Jun 2014, Christoph Hellwig wrote:
> On Mon, Jun 02, 2014 at 04:14:06PM +0200, Oleg Nesterov wrote:
> > Ingo, please pull from
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc uprobes/core
> >
> > Based on tip:perf/uprobes
>
> Eww, adding tmpfs-specific code to uprobes screams layering violation.
>
> Hugh, what is the problem with implementing ->readpage for tmpfs again?
The problem is that ->readpage invites the caller to allocate a page
of their choice for pagecache, and then pass it down to the filesystem
to fill and use thereafter.
There are several ways in which that does not suit tmpfs, 3 spring to mind:
1. the page may already be in memory, but currently in swapcache not in
filecache: tmpfs knows how to manage that, the ->readpage caller does not
2. there may be a NUMA mempolicy applied to that file, which would choose
to allocate the page differently: tmpfs knows about that, caller does not
3. (handy side-effect) it happens to disable use of tmpfs file as swapfile
It was a great relief when tmpfs could finally jettison its ->readpage
back in v3.1 (though if you press me, I could admit to some remaining
embarrassments). I certainly do not want it back.
Just think of tmpfs as a layering violation itself (memory as backing!
no wonder it has peculiar demands on the allocation of its backing)
and we're all good - there's a variety of ways in which the generic
code already happens to accommodate it (many PageSwapBacked tests,
or the mapping_cap_account_dirty/writeback tests, for example).
IIRC, you were in on the discussion of shmem_read_mapping_page() when we
introduced it: Oleg is simply adding a call to it to fix a uprobes bug.
That the name explicitly mentions shmem instead of concealing it,
is not necessarily a bad thing.
Hugh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] uprobes: tmpfs support
2014-06-02 18:30 ` Christoph Hellwig
2014-06-02 19:09 ` Hugh Dickins
@ 2014-06-02 19:23 ` Oleg Nesterov
1 sibling, 0 replies; 4+ messages in thread
From: Oleg Nesterov @ 2014-06-02 19:23 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Ingo Molnar, Denys Vlasenko, Hugh Dickins, Jim Keniston,
Masami Hiramatsu, Srikar Dronamraju, linux-kernel
On 06/02, Christoph Hellwig wrote:
>
> On Mon, Jun 02, 2014 at 04:14:06PM +0200, Oleg Nesterov wrote:
> > Ingo, please pull from
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc uprobes/core
> >
> > Based on tip:perf/uprobes
>
> Eww, adding tmpfs-specific code to uprobes screams layering violation.
>
> Hugh, what is the problem with implementing ->readpage for tmpfs again?
I leave this to you and Hugh.
But I hope you are not arguing with this patch, it is very simple and we
do want to support tmpfs. If tmpfs has ->readpage again we can revert this
patch.
BTW. Is it safe to pass file == NULL to read_mapping_page() and ->readpage()?
Last time I tried to check this looked safe but this is not documented. We
need to call read_mapping_page() from uprobe_register() but it doesn't have
"struct file *" and thus we need to delay arch_uprobe_analyze_insn() until
we find the first mapping, too bad.
And why read_mapping_page() has "void *data" but not "struct file *file"...
Oleg.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-02 19:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 14:14 [GIT PULL] uprobes: tmpfs support Oleg Nesterov
2014-06-02 18:30 ` Christoph Hellwig
2014-06-02 19:09 ` Hugh Dickins
2014-06-02 19:23 ` Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).