From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756973AbcDLKNy (ORCPT ); Tue, 12 Apr 2016 06:13:54 -0400 Received: from outbound-smtp02.blacknight.com ([81.17.249.8]:33796 "EHLO outbound-smtp02.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756951AbcDLKNw (ORCPT ); Tue, 12 Apr 2016 06:13:52 -0400 From: Mel Gorman To: Andrew Morton Cc: Vlastimil Babka , Linux-MM , LKML , Mel Gorman Subject: [PATCH 14/24] mm, page_alloc: Simplify last cpupid reset Date: Tue, 12 Apr 2016 11:12:15 +0100 Message-Id: <1460455945-29644-15-git-send-email-mgorman@techsingularity.net> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1460455945-29644-1-git-send-email-mgorman@techsingularity.net> References: <1460455945-29644-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