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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 1D07DC4360F for ; Thu, 21 Mar 2019 08:07:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E182F218D4 for ; Thu, 21 Mar 2019 08:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553155627; bh=fENShAcGF1y05xVSoT5QcYnUU+ByFHLKhs5evstHwas=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=qpUpYN8UENu7lYOYhBeIL3oxO1HYsQ8HTseKPKIyrPA6Biguo/tZ9R5JNtTHM4MES atqieOBdYwKpTpZXMUP+WFsYDAEv2T+5xcJ7eU1zuy/JeAJe8nEjA7OKbWrZXtsZJg RHD5RKoBphCFMJlyOQU+b1bumRZnAgXSnsb1Uvl8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727987AbfCUIHF (ORCPT ); Thu, 21 Mar 2019 04:07:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:59686 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727926AbfCUIHF (ORCPT ); Thu, 21 Mar 2019 04:07:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AD88AAC58; Thu, 21 Mar 2019 08:07:03 +0000 (UTC) Date: Thu, 21 Mar 2019 09:07:02 +0100 From: Michal Hocko To: Anshuman Khandual Cc: Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, mike.kravetz@oracle.com, osalvador@suse.de, akpm@linux-foundation.org Subject: Re: [PATCH] mm/isolation: Remove redundant pfn_valid_within() in __first_valid_page() Message-ID: <20190321080702.GG8696@dhcp22.suse.cz> References: <1553141595-26907-1-git-send-email-anshuman.khandual@arm.com> <8AB57711-48C0-4D95-BC5F-26B266DC3AE8@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 21-03-19 11:03:18, Anshuman Khandual wrote: > > > On 03/21/2019 10:31 AM, Zi Yan wrote: > > On 20 Mar 2019, at 21:13, Anshuman Khandual wrote: > > > >> pfn_valid_within() calls pfn_valid() when CONFIG_HOLES_IN_ZONE making it > >> redundant for both definitions (w/wo CONFIG_MEMORY_HOTPLUG) of the helper > >> pfn_to_online_page() which either calls pfn_valid() or pfn_valid_within(). > >> pfn_valid_within() being 1 when !CONFIG_HOLES_IN_ZONE is irrelevant either > >> way. This does not change functionality. > >> > >> Fixes: 2ce13640b3f4 ("mm: __first_valid_page skip over offline pages") > > > > I would not say this patch fixes the commit 2ce13640b3f4 from 2017, > > because the pfn_valid_within() in pfn_to_online_page() was introduced by > > a recent commit b13bc35193d9e last month. :) > > Right, will update the tag with this commit. The patch is correct but I wouldn't bother to add Fixes tag at all. The current code is obviously not incorrect. Do you see any actual performance issue? -- Michal Hocko SUSE Labs