[PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-05-31 Thread Christophe Leroy
[ Upstream commit 326691ad4f179e6edc7eb1271e618dd673e4736d ]

bitmap_or() and bitmap_andnot() can work properly with dst identical
to src1 or src2. There is no need of an intermediate result bitmap
that is copied back to dst in a second step.

Signed-off-by: Christophe Leroy 
Reviewed-by: Aneesh Kumar K.V 
Reviewed-by: Nicholas Piggin 
Signed-off-by: Michael Ellerman 
---
 arch/powerpc/mm/slice.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index a4f93699194b..b79897bb89e3 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -379,21 +379,17 @@ static unsigned long slice_find_area(struct mm_struct 
*mm, unsigned long len,
 
 static inline void slice_or_mask(struct slice_mask *dst, struct slice_mask 
*src)
 {
-   DECLARE_BITMAP(result, SLICE_NUM_HIGH);
-
dst->low_slices |= src->low_slices;
-   bitmap_or(result, dst->high_slices, src->high_slices, SLICE_NUM_HIGH);
-   bitmap_copy(dst->high_slices, result, SLICE_NUM_HIGH);
+   bitmap_or(dst->high_slices, dst->high_slices, src->high_slices,
+ SLICE_NUM_HIGH);
 }
 
 static inline void slice_andnot_mask(struct slice_mask *dst, struct slice_mask 
*src)
 {
-   DECLARE_BITMAP(result, SLICE_NUM_HIGH);
-
dst->low_slices &= ~src->low_slices;
 
-   bitmap_andnot(result, dst->high_slices, src->high_slices, 
SLICE_NUM_HIGH);
-   bitmap_copy(dst->high_slices, result, SLICE_NUM_HIGH);
+   bitmap_andnot(dst->high_slices, dst->high_slices, src->high_slices,
+ SLICE_NUM_HIGH);
 }
 
 #ifdef CONFIG_PPC_64K_PAGES
-- 
2.13.3



Re: [PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-03-13 Thread Michael Ellerman
Greg Kroah-Hartman  writes:
> On Sat, Mar 10, 2018 at 05:14:22PM +0100, christophe leroy wrote:
>> Le 10/03/2018 à 15:52, Greg Kroah-Hartman a écrit :
>> > On Sat, Mar 10, 2018 at 08:27:54AM +0100, christophe leroy wrote:
>> > > Le 10/03/2018 à 01:10, Greg Kroah-Hartman a écrit :
>> > > > On Fri, Mar 09, 2018 at 04:48:59PM +0100, Christophe Leroy wrote:
>> > > > > Upstream 326691ad4f179e6edc7eb1271e618dd673e4736d
>> > > > 
>> > > > There is no such git commit id in Linus's tree :(
>> > > > 
>> > > > Please fix up and resend the series.
>> > > 
>> > > I checked again, it is there
>> > > 
>> > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/mm/slice.c?h=next-20180309=326691ad4f179e6edc7eb1271e618dd673e4736d
>> > 
>> > That is linux-next, which has everything and the kitchen sink.  It is
>> > not Linus's tree.  Please wait for these things to be merged into
>> > Linus's tree before asking for the to be merged into the stable tree.
>> > That's a requirement.
>> 
>> Oops, sorry, I thought everything on kernel.org was official.
>
> That would be a whole lot of "official" :)
>
> Please read:
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for what the rules are here, if you haven't already.
>
>> Once it is in, do I resend the patches or do I just ping you ?
>
> You would need to resend the patches (if they need backporting
> manually), or just send a list of the git commit ids that are needed to
> be applied (usually easier.)
>
> Also, why were these patches not tagged with the stable tag to start
> with?  That way they would be automatically included in the stable tree
> when they hit Linus's tree.

Because they're fairly large and invasive and not well tested on other
platforms, so the maintainer is not comfortable with them going straight
to stable :)

Once they've had some testing in Linus' tree at least, then we'll ask
for a backport if there's no issues.

Sorry for the confusion.

cheers


Re: [PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-03-10 Thread Greg Kroah-Hartman
On Sat, Mar 10, 2018 at 05:14:22PM +0100, christophe leroy wrote:
> 
> 
> Le 10/03/2018 à 15:52, Greg Kroah-Hartman a écrit :
> > On Sat, Mar 10, 2018 at 08:27:54AM +0100, christophe leroy wrote:
> > > 
> > > 
> > > Le 10/03/2018 à 01:10, Greg Kroah-Hartman a écrit :
> > > > On Fri, Mar 09, 2018 at 04:48:59PM +0100, Christophe Leroy wrote:
> > > > > Upstream 326691ad4f179e6edc7eb1271e618dd673e4736d
> > > > 
> > > > There is no such git commit id in Linus's tree :(
> > > > 
> > > > Please fix up and resend the series.
> > > 
> > > I checked again, it is there
> > > 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/mm/slice.c?h=next-20180309=326691ad4f179e6edc7eb1271e618dd673e4736d
> > 
> > That is linux-next, which has everything and the kitchen sink.  It is
> > not Linus's tree.  Please wait for these things to be merged into
> > Linus's tree before asking for the to be merged into the stable tree.
> > That's a requirement.
> > 
> 
> Oops, sorry, I thought everything on kernel.org was official.

That would be a whole lot of "official" :)

Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for what the rules are here, if you haven't already.

> Once it is in, do I resend the patches or do I just ping you ?

You would need to resend the patches (if they need backporting
manually), or just send a list of the git commit ids that are needed to
be applied (usually easier.)

Also, why were these patches not tagged with the stable tag to start
with?  That way they would be automatically included in the stable tree
when they hit Linus's tree.

thanks,

greg k-h


Re: [PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-03-10 Thread christophe leroy



Le 10/03/2018 à 15:52, Greg Kroah-Hartman a écrit :

On Sat, Mar 10, 2018 at 08:27:54AM +0100, christophe leroy wrote:



Le 10/03/2018 à 01:10, Greg Kroah-Hartman a écrit :

On Fri, Mar 09, 2018 at 04:48:59PM +0100, Christophe Leroy wrote:

Upstream 326691ad4f179e6edc7eb1271e618dd673e4736d


There is no such git commit id in Linus's tree :(

Please fix up and resend the series.


I checked again, it is there

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/mm/slice.c?h=next-20180309=326691ad4f179e6edc7eb1271e618dd673e4736d


That is linux-next, which has everything and the kitchen sink.  It is
not Linus's tree.  Please wait for these things to be merged into
Linus's tree before asking for the to be merged into the stable tree.
That's a requirement.



Oops, sorry, I thought everything on kernel.org was official.

Once it is in, do I resend the patches or do I just ping you ?

Thanks
Christophe

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus



Re: [PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-03-10 Thread Greg Kroah-Hartman
On Sat, Mar 10, 2018 at 08:27:54AM +0100, christophe leroy wrote:
> 
> 
> Le 10/03/2018 à 01:10, Greg Kroah-Hartman a écrit :
> > On Fri, Mar 09, 2018 at 04:48:59PM +0100, Christophe Leroy wrote:
> > > Upstream 326691ad4f179e6edc7eb1271e618dd673e4736d
> > 
> > There is no such git commit id in Linus's tree :(
> > 
> > Please fix up and resend the series.
> 
> I checked again, it is there
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/mm/slice.c?h=next-20180309=326691ad4f179e6edc7eb1271e618dd673e4736d

That is linux-next, which has everything and the kitchen sink.  It is
not Linus's tree.  Please wait for these things to be merged into
Linus's tree before asking for the to be merged into the stable tree.
That's a requirement.

thanks,

greg k-h


Re: [PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-03-09 Thread christophe leroy



Le 10/03/2018 à 01:10, Greg Kroah-Hartman a écrit :

On Fri, Mar 09, 2018 at 04:48:59PM +0100, Christophe Leroy wrote:

Upstream 326691ad4f179e6edc7eb1271e618dd673e4736d


There is no such git commit id in Linus's tree :(

Please fix up and resend the series.


I checked again, it is there

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/powerpc/mm/slice.c?h=next-20180309=326691ad4f179e6edc7eb1271e618dd673e4736d

The id seems to be exactly the same.

Christophe



thanks,

greg k-h



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus



Re: [PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-03-09 Thread Greg Kroah-Hartman
On Fri, Mar 09, 2018 at 04:48:59PM +0100, Christophe Leroy wrote:
> Upstream 326691ad4f179e6edc7eb1271e618dd673e4736d

There is no such git commit id in Linus's tree :(

Please fix up and resend the series.

thanks,

greg k-h


[PATCH 4.14 1/4] powerpc/mm/slice: Remove intermediate bitmap copy

2018-03-09 Thread Christophe Leroy
Upstream 326691ad4f179e6edc7eb1271e618dd673e4736d

bitmap_or() and bitmap_andnot() can work properly with dst identical
to src1 or src2. There is no need of an intermediate result bitmap
that is copied back to dst in a second step.

Signed-off-by: Christophe Leroy 
Reviewed-by: Aneesh Kumar K.V 
Reviewed-by: Nicholas Piggin 
Signed-off-by: Michael Ellerman 
---
 arch/powerpc/mm/slice.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index 45f6740dd407..a7ac600f71c6 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -379,21 +379,17 @@ static unsigned long slice_find_area(struct mm_struct 
*mm, unsigned long len,
 
 static inline void slice_or_mask(struct slice_mask *dst, struct slice_mask 
*src)
 {
-   DECLARE_BITMAP(result, SLICE_NUM_HIGH);
-
dst->low_slices |= src->low_slices;
-   bitmap_or(result, dst->high_slices, src->high_slices, SLICE_NUM_HIGH);
-   bitmap_copy(dst->high_slices, result, SLICE_NUM_HIGH);
+   bitmap_or(dst->high_slices, dst->high_slices, src->high_slices,
+ SLICE_NUM_HIGH);
 }
 
 static inline void slice_andnot_mask(struct slice_mask *dst, struct slice_mask 
*src)
 {
-   DECLARE_BITMAP(result, SLICE_NUM_HIGH);
-
dst->low_slices &= ~src->low_slices;
 
-   bitmap_andnot(result, dst->high_slices, src->high_slices, 
SLICE_NUM_HIGH);
-   bitmap_copy(dst->high_slices, result, SLICE_NUM_HIGH);
+   bitmap_andnot(dst->high_slices, dst->high_slices, src->high_slices,
+ SLICE_NUM_HIGH);
 }
 
 #ifdef CONFIG_PPC_64K_PAGES
-- 
2.13.3