From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B566C072B5 for ; Fri, 24 May 2019 19:33:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2D18217F9 for ; Fri, 24 May 2019 19:33:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732080AbfEXTd3 (ORCPT ); Fri, 24 May 2019 15:33:29 -0400 Received: from mga18.intel.com ([134.134.136.126]:61073 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbfEXTd3 (ORCPT ); Fri, 24 May 2019 15:33:29 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2019 12:33:28 -0700 X-ExtLoop1: 1 Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by orsmga005.jf.intel.com with ESMTP; 24 May 2019 12:33:28 -0700 From: ira.weiny@intel.com To: Andrew Morton , Vlastimil Babka , Michal Hocko , Matthew Wilcox Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ira Weiny Subject: [PATCH RFC] mm/swap: make release_pages() and put_pages() match Date: Fri, 24 May 2019 12:34:15 -0700 Message-Id: <20190524193415.9733-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny RFC I have no idea if this is correct or not. But looking at release_pages() I see a call to both __ClearPageActive() and __ClearPageWaiters() while in __page_cache_release() I do not. Is this a bug which needs to be fixed? Did I miss clearing active somewhere else in the call chain of put_page? This was found via code inspection while determining if release_pages() and the new put_user_pages() could be interchangeable. Signed-off-by: Ira Weiny --- mm/swap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/swap.c b/mm/swap.c index 3a75722e68a9..9d0432baddb0 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -69,6 +69,7 @@ static void __page_cache_release(struct page *page) del_page_from_lru_list(page, lruvec, page_off_lru(page)); spin_unlock_irqrestore(&pgdat->lru_lock, flags); } + __ClearPageActive(page); __ClearPageWaiters(page); mem_cgroup_uncharge(page); } -- 2.20.1