From: Oleg Nesterov <oleg@redhat.com>
To: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>, Ingo Molnar <mingo@elte.hu>,
Denys Vlasenko <dvlasenk@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: uprobes && shmem (Was: uprobes: Shift ->readpage check from __copy_insn() to uprobe_register())
Date: Sat, 17 May 2014 18:58:29 +0200 [thread overview]
Message-ID: <20140517165829.GA20772@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1405161847040.5810@eggly.anvils>
On 05/16, Hugh Dickins wrote:
>
> On Fri, 16 May 2014, Hugh Dickins wrote:
> > On Fri, 16 May 2014, Oleg Nesterov wrote:
> > > shmem_getpage_gfp(). But, is there any way to figure out that this
> > > inode/mapping/aops/whatever is actually shmem?
> >
> > On 3.15 and later, you're in luck: Hannes added bool shmem_mapping(mapping)
> > in his 0cd6144aadd2 "mm + fs: prepare for non-page entries in page cache
> > radix trees"; and I just checked, it builds for "tiny" !CONFIG_SHMEM too.
> >
> > If you're backporting to an earlier kernel, it would probably be best
> > to add in a very small patch, extracting just shmem_mapping() and its
> > linux/mm.h declarations from 0cd6144aadd2.
>
> Looking into something else, I've just been reminded of
> mapping_cap_swap_backed(mapping): mm/madvise.c has been using that test
> for a year. It also returns true on swapper_space, the imaginary mapping
> you get from a PageSwapCache page: so I suppose it would be wrong to make
> Hannes's shmem_mapping() a wrapper to that. But for any backport of your
> change, it would better than extracting part of 0cd6144aadd2.
Yes, this should work, swap_address_space() can't be seen as ->i_mapping,
> (Sorry for going on about backporting, when you may have no such intention.)
No, no, thanks for additional info. Perhaps we will actually backport
this, at least in rhel. Although in the latter case perhaps it would
be better to extract shmem_mapping() from 0cd6144aadd2, it is simple
and straightforward.
Thanks,
Oleg.
prev parent reply other threads:[~2014-05-17 16:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140516152919.GA30659@redhat.com>
2014-05-16 15:30 ` uprobes && shmem (Was: uprobes: Shift ->readpage check from __copy_insn() to uprobe_register()) Oleg Nesterov
2014-05-16 18:49 ` Hugh Dickins
2014-05-16 19:29 ` Oleg Nesterov
2014-05-17 2:07 ` Hugh Dickins
2014-05-17 16:58 ` Oleg Nesterov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140517165829.GA20772@redhat.com \
--to=oleg@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox