All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Capper <steve.capper@linaro.org>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Will Deacon <will.deacon@arm.com>,
	Gary Robertson <gary.robertson@linaro.org>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Anders Roxell <anders.roxell@linaro.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	Dann Frazier <dann.frazier@canonical.com>,
	Mark Rutland <mark.rutland@arm.com>, Mel Gorman <mgorman@suse.de>,
	Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH V4 1/6] mm: Introduce a general RCU get_user_pages_fast.
Date: Thu, 2 Oct 2014 23:18:00 +0700	[thread overview]
Message-ID: <CAPvkgC3VkmctmD9dROqkAEwi-Njm9zQqVx1=Byttr5_n-J7wYw@mail.gmail.com> (raw)
In-Reply-To: <20141002121902.GA2342@redhat.com>

On 2 October 2014 19:19, Andrea Arcangeli <aarcange@redhat.com> wrote:
> Hi Steve,
>

Hi Andrea,

> On Fri, Sep 26, 2014 at 03:03:48PM +0100, Steve Capper wrote:
>> This patch provides a general RCU implementation of get_user_pages_fast
>> that can be used by architectures that perform hardware broadcast of
>> TLB invalidations.
>>
>> It is based heavily on the PowerPC implementation by Nick Piggin.
>
> It'd be nice if you could also at the same time apply it to sparc and
> powerpc in this same patchset to show the effectiveness of having a
> generic version. Because if it's not a trivial drop-in replacement,
> then this should go in arch/arm* instead of mm/gup.c...

I think it should be adapted (if need be) and adopted for sparc, power
and others, especially as it will result in a reduction in code size
and make future alterations to gup easier.
I would prefer to get this in iteratively; and have people who are
knowledgeable of those architectures and have a means of testing the
code thoroughly to help out. (it will be very hard for me to implement
this on my own, but likely trivial for people who know and can test
those architectures).

>
> Also I wonder if it wouldn't be better to add it to mm/util.c along
> with the __weak gup_fast but then this is ok too. I'm just saying
> because we never had sings of gup_fast code in mm/gup.c so far but
> then this isn't exactly a __weak version of it... so I don't mind
> either ways.

mm/gup.c was recently created?
It may even make sense to move the weak version in a future patch?

>
>> +             down_read(&mm->mmap_sem);
>> +             ret = get_user_pages(current, mm, start,
>> +                                  nr_pages - nr, write, 0, pages, NULL);
>> +             up_read(&mm->mmap_sem);
>
> This has a collision with a patchset I posted, but it's trivial to
> solve, the above three lines need to be replaced with:
>
> +               ret = get_user_pages_unlocked(current, mm, start,
> +                                    nr_pages - nr, write, 0, pages);
>
> And then arm gup_fast will also page fault with FOLL_FAULT_ALLOW_RETRY
> the first time to release the mmap_sem before I/O.
>

Ahh thanks.
I'm currently on holiday and have very limited access to email, I'd
appreciate it if someone can keep an eye out for this during the merge
window if this conflict arises?

> Thanks,
> Andrea

Cheers,
--
Steve

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Steve Capper <steve.capper@linaro.org>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Will Deacon <will.deacon@arm.com>,
	Gary Robertson <gary.robertson@linaro.org>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Anders Roxell <anders.roxell@linaro.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	Dann Frazier <dann.frazier@canonical.com>,
	Mark Rutland <mark.rutland@arm.com>, Mel Gorman <mgorman@suse.de>,
	Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH V4 1/6] mm: Introduce a general RCU get_user_pages_fast.
Date: Thu, 2 Oct 2014 23:18:00 +0700	[thread overview]
Message-ID: <CAPvkgC3VkmctmD9dROqkAEwi-Njm9zQqVx1=Byttr5_n-J7wYw@mail.gmail.com> (raw)
Message-ID: <20141002161800.-4kLsPlotiaq3OHKZLV6WlE3ZxDLHlXPGNsZwzgDpLA@z> (raw)
In-Reply-To: <20141002121902.GA2342@redhat.com>

On 2 October 2014 19:19, Andrea Arcangeli <aarcange@redhat.com> wrote:
> Hi Steve,
>

Hi Andrea,

> On Fri, Sep 26, 2014 at 03:03:48PM +0100, Steve Capper wrote:
>> This patch provides a general RCU implementation of get_user_pages_fast
>> that can be used by architectures that perform hardware broadcast of
>> TLB invalidations.
>>
>> It is based heavily on the PowerPC implementation by Nick Piggin.
>
> It'd be nice if you could also at the same time apply it to sparc and
> powerpc in this same patchset to show the effectiveness of having a
> generic version. Because if it's not a trivial drop-in replacement,
> then this should go in arch/arm* instead of mm/gup.c...

I think it should be adapted (if need be) and adopted for sparc, power
and others, especially as it will result in a reduction in code size
and make future alterations to gup easier.
I would prefer to get this in iteratively; and have people who are
knowledgeable of those architectures and have a means of testing the
code thoroughly to help out. (it will be very hard for me to implement
this on my own, but likely trivial for people who know and can test
those architectures).

>
> Also I wonder if it wouldn't be better to add it to mm/util.c along
> with the __weak gup_fast but then this is ok too. I'm just saying
> because we never had sings of gup_fast code in mm/gup.c so far but
> then this isn't exactly a __weak version of it... so I don't mind
> either ways.

mm/gup.c was recently created?
It may even make sense to move the weak version in a future patch?

>
>> +             down_read(&mm->mmap_sem);
>> +             ret = get_user_pages(current, mm, start,
>> +                                  nr_pages - nr, write, 0, pages, NULL);
>> +             up_read(&mm->mmap_sem);
>
> This has a collision with a patchset I posted, but it's trivial to
> solve, the above three lines need to be replaced with:
>
> +               ret = get_user_pages_unlocked(current, mm, start,
> +                                    nr_pages - nr, write, 0, pages);
>
> And then arm gup_fast will also page fault with FOLL_FAULT_ALLOW_RETRY
> the first time to release the mmap_sem before I/O.
>

Ahh thanks.
I'm currently on holiday and have very limited access to email, I'd
appreciate it if someone can keep an eye out for this during the merge
window if this conflict arises?

> Thanks,
> Andrea

Cheers,
--
Steve

WARNING: multiple messages have this Message-ID (diff)
From: steve.capper@linaro.org (Steve Capper)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 1/6] mm: Introduce a general RCU get_user_pages_fast.
Date: Thu, 2 Oct 2014 23:18:00 +0700	[thread overview]
Message-ID: <CAPvkgC3VkmctmD9dROqkAEwi-Njm9zQqVx1=Byttr5_n-J7wYw@mail.gmail.com> (raw)
In-Reply-To: <20141002121902.GA2342@redhat.com>

On 2 October 2014 19:19, Andrea Arcangeli <aarcange@redhat.com> wrote:
> Hi Steve,
>

Hi Andrea,

> On Fri, Sep 26, 2014 at 03:03:48PM +0100, Steve Capper wrote:
>> This patch provides a general RCU implementation of get_user_pages_fast
>> that can be used by architectures that perform hardware broadcast of
>> TLB invalidations.
>>
>> It is based heavily on the PowerPC implementation by Nick Piggin.
>
> It'd be nice if you could also at the same time apply it to sparc and
> powerpc in this same patchset to show the effectiveness of having a
> generic version. Because if it's not a trivial drop-in replacement,
> then this should go in arch/arm* instead of mm/gup.c...

I think it should be adapted (if need be) and adopted for sparc, power
and others, especially as it will result in a reduction in code size
and make future alterations to gup easier.
I would prefer to get this in iteratively; and have people who are
knowledgeable of those architectures and have a means of testing the
code thoroughly to help out. (it will be very hard for me to implement
this on my own, but likely trivial for people who know and can test
those architectures).

>
> Also I wonder if it wouldn't be better to add it to mm/util.c along
> with the __weak gup_fast but then this is ok too. I'm just saying
> because we never had sings of gup_fast code in mm/gup.c so far but
> then this isn't exactly a __weak version of it... so I don't mind
> either ways.

mm/gup.c was recently created?
It may even make sense to move the weak version in a future patch?

>
>> +             down_read(&mm->mmap_sem);
>> +             ret = get_user_pages(current, mm, start,
>> +                                  nr_pages - nr, write, 0, pages, NULL);
>> +             up_read(&mm->mmap_sem);
>
> This has a collision with a patchset I posted, but it's trivial to
> solve, the above three lines need to be replaced with:
>
> +               ret = get_user_pages_unlocked(current, mm, start,
> +                                    nr_pages - nr, write, 0, pages);
>
> And then arm gup_fast will also page fault with FOLL_FAULT_ALLOW_RETRY
> the first time to release the mmap_sem before I/O.
>

Ahh thanks.
I'm currently on holiday and have very limited access to email, I'd
appreciate it if someone can keep an eye out for this during the merge
window if this conflict arises?

> Thanks,
> Andrea

Cheers,
--
Steve

  reply	other threads:[~2014-10-02 16:18 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 14:03 [PATCH V4 0/6] RCU get_user_pages_fast and __get_user_pages_fast Steve Capper
2014-09-26 14:03 ` Steve Capper
2014-09-26 14:03 ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 1/6] mm: Introduce a general RCU get_user_pages_fast Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-29 21:51   ` Hugh Dickins
2014-09-29 21:51     ` Hugh Dickins
2014-09-29 21:51     ` Hugh Dickins
2014-10-01 11:11     ` Catalin Marinas
2014-10-01 11:11       ` Catalin Marinas
2014-10-01 11:11       ` Catalin Marinas
2014-10-01 11:11       ` Catalin Marinas
2014-10-02 16:00     ` Steve Capper
2014-10-02 16:00       ` Steve Capper
2014-10-02 16:00       ` Steve Capper
2014-10-02 12:19   ` Andrea Arcangeli
2014-10-02 12:19     ` Andrea Arcangeli
2014-10-02 12:19     ` Andrea Arcangeli
2014-10-02 16:18     ` Steve Capper [this message]
2014-10-02 16:18       ` Steve Capper
2014-10-02 16:18       ` Steve Capper
2014-10-02 16:54       ` Andrea Arcangeli
2014-10-02 16:54         ` Andrea Arcangeli
2014-10-02 16:54         ` Andrea Arcangeli
2014-10-13  5:15     ` Aneesh Kumar K.V
2014-10-13  5:15       ` Aneesh Kumar K.V
2014-10-13  5:15       ` Aneesh Kumar K.V
2014-10-13  5:21       ` David Miller
2014-10-13  5:21         ` David Miller
2014-10-13  5:21         ` David Miller
2014-10-13 11:44         ` Steve Capper
2014-10-13 11:44           ` Steve Capper
2014-10-13 11:44           ` Steve Capper
2014-10-13 16:06           ` David Miller
2014-10-13 16:06             ` David Miller
2014-10-13 16:06             ` David Miller
2014-10-14 12:38             ` Steve Capper
2014-10-14 12:38               ` Steve Capper
2014-10-14 12:38               ` Steve Capper
2014-10-14 16:30               ` David Miller
2014-10-14 16:30                 ` David Miller
2014-10-14 16:30                 ` David Miller
2014-10-13 17:04           ` Aneesh Kumar K.V
2014-10-13 17:04             ` Aneesh Kumar K.V
2014-10-13 17:04             ` Aneesh Kumar K.V
2014-10-13  6:22   ` Aneesh Kumar K.V
2014-10-13  6:22     ` Aneesh Kumar K.V
2014-10-13  6:22     ` Aneesh Kumar K.V
2014-10-13  6:22     ` Aneesh Kumar K.V
2014-09-26 14:03 ` [PATCH V4 2/6] arm: mm: Introduce special ptes for LPAE Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 3/6] arm: mm: Enable HAVE_RCU_TABLE_FREE logic Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 4/6] arm: mm: Enable RCU fast_gup Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 5/6] arm64: mm: Enable HAVE_RCU_TABLE_FREE logic Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 6/6] arm64: mm: Enable RCU fast_gup Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2015-02-27 12:42 ` [PATCH V4 0/6] RCU get_user_pages_fast and __get_user_pages_fast Jon Masters
2015-02-27 12:42   ` Jon Masters
2015-02-27 12:42   ` Jon Masters
2015-02-27 13:20   ` Mark Rutland
2015-02-27 13:20     ` Mark Rutland
2015-02-27 13:20     ` Mark Rutland
2015-03-02 14:16     ` Mark Rutland
2015-03-02 14:16       ` Mark Rutland
2015-03-02 14:16       ` Mark Rutland
2015-03-02  2:10   ` PMD update corruption (sync question) Jon Masters
2015-03-02  2:10     ` Jon Masters
2015-03-02  5:58     ` Jon Masters
2015-03-02  5:58       ` Jon Masters
2015-03-02  5:58       ` Jon Masters
2015-03-02 10:50       ` Catalin Marinas
2015-03-02 10:50         ` Catalin Marinas
2015-03-02 10:50         ` Catalin Marinas
2015-03-02 11:06         ` Jon Masters
2015-03-02 11:06           ` Jon Masters
2015-03-02 11:06           ` Jon Masters
2015-03-02 12:31           ` Peter Zijlstra
2015-03-02 12:31             ` Peter Zijlstra
2015-03-02 12:31             ` Peter Zijlstra
2015-03-02 12:40             ` Geert Uytterhoeven
2015-03-02 12:40               ` Geert Uytterhoeven
2015-03-02 12:40               ` Geert Uytterhoeven
2015-03-02 22:21         ` Jon Masters
2015-03-02 22:21           ` Jon Masters
2015-03-02 22:21           ` Jon Masters
2015-03-02 22:29           ` Jon Masters
2015-03-02 22:29             ` Jon Masters
2015-03-02 22:29             ` Jon Masters
2015-03-03  9:06           ` Arnd Bergmann
2015-03-03  9:06             ` Arnd Bergmann
2015-03-03  9:06             ` Arnd Bergmann
2015-03-03 15:46             ` Jon Masters
2015-03-03 15:46               ` Jon Masters
2015-03-03 15:46               ` Jon Masters

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='CAPvkgC3VkmctmD9dROqkAEwi-Njm9zQqVx1=Byttr5_n-J7wYw@mail.gmail.com' \
    --to=steve.capper@linaro.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=dann.frazier@canonical.com \
    --cc=gary.robertson@linaro.org \
    --cc=hughd@google.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mgorman@suse.de \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.