From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753658AbcDOJI0 (ORCPT ); Fri, 15 Apr 2016 05:08:26 -0400 Received: from outbound-smtp07.blacknight.com ([46.22.139.12]:57076 "EHLO outbound-smtp07.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752255AbcDOJIX (ORCPT ); Fri, 15 Apr 2016 05:08:23 -0400 From: Mel Gorman To: Andrew Morton Cc: Vlastimil Babka , Jesper Dangaard Brouer , Linux-MM , LKML , Mel Gorman Subject: [PATCH 14/28] mm, page_alloc: Simplify last cpupid reset Date: Fri, 15 Apr 2016 10:07:41 +0100 Message-Id: <1460711275-1130-2-git-send-email-mgorman@techsingularity.net> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1460711275-1130-1-git-send-email-mgorman@techsingularity.net> References: <1460710760-32601-1-git-send-email-mgorman@techsingularity.net> <1460711275-1130-1-git-send-email-mgorman@techsingularity.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current reset unnecessarily clears flags and makes pointless calculations. Signed-off-by: Mel Gorman --- include/linux/mm.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index ffcff53e3b2b..60656db00abd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -837,10 +837,7 @@ extern int page_cpupid_xchg_last(struct page *page, int cpupid); static inline void page_cpupid_reset_last(struct page *page) { - int cpupid = (1 << LAST_CPUPID_SHIFT) - 1; - - page->flags &= ~(LAST_CPUPID_MASK << LAST_CPUPID_PGSHIFT); - page->flags |= (cpupid & LAST_CPUPID_MASK) << LAST_CPUPID_PGSHIFT; + page->flags |= LAST_CPUPID_MASK << LAST_CPUPID_PGSHIFT; } #endif /* LAST_CPUPID_NOT_IN_PAGE_FLAGS */ #else /* !CONFIG_NUMA_BALANCING */ -- 2.6.4