linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Delete meaningless check of current_order in __rmqueue_fallback
@ 2016-06-12 18:03 YOSHIDA Masanori
  2016-06-20 14:35 ` Michal Hocko
  0 siblings, 1 reply; 4+ messages in thread
From: YOSHIDA Masanori @ 2016-06-12 18:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, mgorman, vbabka, mhocko, rientjes, iamjoonsoo.kim,
	izumi.taku, hannes, linux-mm, YOSHIDA Masanori

From: YOSHIDA Masanori <masanori.yoshida@gmail.com>

Signed-off-by: YOSHIDA Masanori <masanori.yoshida@gmail.com>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6903b69..db02967 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2105,7 +2105,7 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype)
 
 	/* Find the largest possible block of pages in the other list */
 	for (current_order = MAX_ORDER-1;
-				current_order >= order && current_order <= MAX_ORDER-1;
+				current_order >= order;
 				--current_order) {
 		area = &(zone->free_area[current_order]);
 		fallback_mt = find_suitable_fallback(area, current_order,
-- 
2.1.4

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Delete meaningless check of current_order in __rmqueue_fallback
  2016-06-12 18:03 [PATCH] Delete meaningless check of current_order in __rmqueue_fallback YOSHIDA Masanori
@ 2016-06-20 14:35 ` Michal Hocko
  2016-06-25  8:15   ` Masanori YOSHIDA
  2016-06-25  8:21   ` Masanori YOSHIDA
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Hocko @ 2016-06-20 14:35 UTC (permalink / raw)
  To: YOSHIDA Masanori
  Cc: linux-kernel, akpm, mgorman, vbabka, rientjes, iamjoonsoo.kim,
	izumi.taku, hannes, linux-mm, YOSHIDA Masanori

On Mon 13-06-16 03:03:31, YOSHIDA Masanori wrote:
> From: YOSHIDA Masanori <masanori.yoshida@gmail.com>
> 
> Signed-off-by: YOSHIDA Masanori <masanori.yoshida@gmail.com>
> ---
>  mm/page_alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6903b69..db02967 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2105,7 +2105,7 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype)
>  
>  	/* Find the largest possible block of pages in the other list */
>  	for (current_order = MAX_ORDER-1;
> -				current_order >= order && current_order <= MAX_ORDER-1;
> +				current_order >= order;
>  				--current_order) {
>  		area = &(zone->free_area[current_order]);
>  		fallback_mt = find_suitable_fallback(area, current_order,

This is incorrect. Guess what happens if the given order is 0. Hint,
current_order is unsigned int.

-- 
Michal Hocko
SUSE Labs

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Delete meaningless check of current_order in __rmqueue_fallback
  2016-06-20 14:35 ` Michal Hocko
@ 2016-06-25  8:15   ` Masanori YOSHIDA
  2016-06-25  8:21   ` Masanori YOSHIDA
  1 sibling, 0 replies; 4+ messages in thread
From: Masanori YOSHIDA @ 2016-06-25  8:15 UTC (permalink / raw)
  To: Michal Hocko
  Cc: linux-kernel, akpm, mgorman, vbabka, rientjes, iamjoonsoo.kim,
	izumi.taku, Johannes Weiner, linux-mm, YOSHIDA Masanori

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

2016-06-20 23:35 GMT+09:00 Michal Hocko <mhocko@kernel.org>:

> On Mon 13-06-16 03:03:31, YOSHIDA Masanori wrote:
> > From: YOSHIDA Masanori <masanori.yoshida@gmail.com>
> >
> > Signed-off-by: YOSHIDA Masanori <masanori.yoshida@gmail.com>
> > ---
> >  mm/page_alloc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index 6903b69..db02967 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -2105,7 +2105,7 @@ __rmqueue_fallback(struct zone *zone, unsigned int
> order, int start_migratetype)
> >
> >       /* Find the largest possible block of pages in the other list */
> >       for (current_order = MAX_ORDER-1;
> > -                             current_order >= order && current_order <=
> MAX_ORDER-1;
> > +                             current_order >= order;
> >                               --current_order) {
> >               area = &(zone->free_area[current_order]);
> >               fallback_mt = find_suitable_fallback(area, current_order,
>
> This is incorrect. Guess what happens if the given order is 0. Hint,
> current_order is unsigned int.


I see. Thank you for replying.
And I should have noticed it before submission by using git-blame. Excuse
me.


> --
> Michal Hocko
> SUSE Labs
>

[-- Attachment #2: Type: text/html, Size: 2188 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Delete meaningless check of current_order in __rmqueue_fallback
  2016-06-20 14:35 ` Michal Hocko
  2016-06-25  8:15   ` Masanori YOSHIDA
@ 2016-06-25  8:21   ` Masanori YOSHIDA
  1 sibling, 0 replies; 4+ messages in thread
From: Masanori YOSHIDA @ 2016-06-25  8:21 UTC (permalink / raw)
  To: Michal Hocko
  Cc: linux-kernel, akpm, mgorman, vbabka, rientjes, iamjoonsoo.kim,
	izumi.taku, Johannes Weiner, linux-mm, YOSHIDA Masanori

On Mon, Jun 20, 2016 at 11:35 PM, Michal Hocko <mhocko@kernel.org> wrote:
> On Mon 13-06-16 03:03:31, YOSHIDA Masanori wrote:
>> From: YOSHIDA Masanori <masanori.yoshida@gmail.com>
>>
>> Signed-off-by: YOSHIDA Masanori <masanori.yoshida@gmail.com>
>> ---
>>  mm/page_alloc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 6903b69..db02967 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -2105,7 +2105,7 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype)
>>
>>       /* Find the largest possible block of pages in the other list */
>>       for (current_order = MAX_ORDER-1;
>> -                             current_order >= order && current_order <= MAX_ORDER-1;
>> +                             current_order >= order;
>>                               --current_order) {
>>               area = &(zone->free_area[current_order]);
>>               fallback_mt = find_suitable_fallback(area, current_order,
>
> This is incorrect. Guess what happens if the given order is 0. Hint,
> current_order is unsigned int.

I see. Thank you for replying.
And I should have noticed this before submission by using git-blame. Excuse me.

> --
> Michal Hocko
> SUSE Labs

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-25  8:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-12 18:03 [PATCH] Delete meaningless check of current_order in __rmqueue_fallback YOSHIDA Masanori
2016-06-20 14:35 ` Michal Hocko
2016-06-25  8:15   ` Masanori YOSHIDA
2016-06-25  8:21   ` Masanori YOSHIDA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox