Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425951 > unrolled thread

[PATCH] Delete meaningless check of current_order in __rmqueue_fallback

Started byYOSHIDA Masanori <masanori.yoshida.lkml@gmail.com>
First post2016-06-19 11:00 +0200
Last post2016-06-20 16:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Delete meaningless check of current_order in __rmqueue_fallback YOSHIDA Masanori <masanori.yoshida.lkml@gmail.com> - 2016-06-19 11:00 +0200
    Re: [PATCH] Delete meaningless check of current_order in  __rmqueue_fallback Michal Hocko <mhocko@kernel.org> - 2016-06-20 16:40 +0200

#1425951 — [PATCH] Delete meaningless check of current_order in __rmqueue_fallback

FromYOSHIDA Masanori <masanori.yoshida.lkml@gmail.com>
Date2016-06-19 11:00 +0200
Subject[PATCH] Delete meaningless check of current_order in __rmqueue_fallback
Message-ID<rLGKd-8mY-9@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1426652 — Re: [PATCH] Delete meaningless check of current_order in __rmqueue_fallback

FromMichal Hocko <mhocko@kernel.org>
Date2016-06-20 16:40 +0200
SubjectRe: [PATCH] Delete meaningless check of current_order in __rmqueue_fallback
Message-ID<rM8wO-ZK-1@gated-at.bofh.it>
In reply to#1425951
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web