linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: David Miller <davem@davemloft.net>, akpm@linux-foundation.org
Cc: aarcange@redhat.com, linux-arch@vger.kernel.org,
	steve.capper@linaro.org, hannes@cmpxchg.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V2 1/2] mm: Update generic gup implementation to handle hugepage directory
Date: Sat, 25 Oct 2014 16:00:05 +0530	[thread overview]
Message-ID: <87ppdg30ia.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141023.184035.388557314666522484.davem@davemloft.net>

David Miller <davem@davemloft.net> writes:

> Hey guys, was looking over the generic GUP while working on a sparc64
> issue and I noticed that you guys do speculative page gets, and after
> talking with Johannes Weiner (CC:'d) about this we don't see how it
> could be necessary.
>
> If interrupts are disabled during the page table scan (which they
> are), no IPI tlb flushes can arrive.  Therefore any removal from the
> page tables is guarded by interrupts being re-enabled.  And as a
> result, page counts of pages we see in the page tables must always
> have a count > 0.
>
> x86 does direct atomic_add() on &page->_count because of this
> invariant and I would rather see the generic version do this too.


But that won't work with RCU GUP. For example on powerpc the tlb flush
doesn't involve an IPI and we can essentially find page count 0.

-aneesh

      parent reply	other threads:[~2014-10-25 10:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17  4:38 [PATCH V2 1/2] mm: Update generic gup implementation to handle hugepage directory Aneesh Kumar K.V
2014-10-17  4:38 ` [PATCH V2 2/2] arch/powerpc: Switch to generic RCU get_user_pages_fast Aneesh Kumar K.V
2014-10-17 14:10 ` [PATCH V2 1/2] mm: Update generic gup implementation to handle hugepage directory Steve Capper
2014-10-22 23:02 ` Andrew Morton
2014-10-23  4:28   ` Aneesh Kumar K.V
2014-10-23  8:08   ` Aneesh Kumar K.V
2014-10-23 22:40   ` David Miller
2014-10-23 23:40     ` Benjamin Herrenschmidt
2014-10-24  3:55       ` David Miller
2014-10-24  8:33       ` Steve Capper
2014-10-24 16:22       ` James Bottomley
2014-10-26 20:50         ` Benjamin Herrenschmidt
2014-10-27  0:18           ` Andrea Arcangeli
2014-10-27 17:58             ` Aneesh Kumar K.V
2014-10-27 18:41               ` Andrea Arcangeli
2014-10-25 10:30     ` Aneesh Kumar K.V [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=87ppdg30ia.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hannes@cmpxchg.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=steve.capper@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).