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.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 B6CAFC33CA4 for ; Fri, 10 Jan 2020 18:22:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 77D6E2187F for ; Fri, 10 Jan 2020 18:22:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="XzwJrBkx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77D6E2187F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0CBD08E0005; Fri, 10 Jan 2020 13:22:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 055528E0001; Fri, 10 Jan 2020 13:22:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E37B78E0005; Fri, 10 Jan 2020 13:22:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id CA53D8E0001 for ; Fri, 10 Jan 2020 13:22:29 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 897EA181AEF00 for ; Fri, 10 Jan 2020 18:22:29 +0000 (UTC) X-FDA: 76362544818.25.queen96_4fe1684b8fc2f X-HE-Tag: queen96_4fe1684b8fc2f X-Filterd-Recvd-Size: 4930 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Fri, 10 Jan 2020 18:22:28 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id n12so2185250lfe.3 for ; Fri, 10 Jan 2020 10:22:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zRzWHHWUjd8GGli20zAKpRHocJhLO6+h0fMpMMJ1Kdg=; b=XzwJrBkxl3yW13eTy/hl5tjp9vze6F192dwkrS1OPoiXlgcelkgVD+rXULocIf+rz/ cKGmxzyIHKxZtqfV5RqH1TATbiAyhbN+bFm2xsu8b24Mpf+iYizu8kgSPn0NA9gjYkNn h9sj/TpGMbzgPR9lNV0jzUexa6lsUiRIXR+OmzRuKzj/EszyzXULGRU/y8Sp/tw+MBzB 6w/adFC9cokbgjFh7jbLjVqGRVWm3/ea1IPxMpMiEQvvHwI+VHh75YO3nXafuP80lHVO OBRtoCEaFvo4EjUSUcxI1DN2YAPIsWxkGbI0xOgg2NphvzPbceqZojORaSXRccvuqtM+ 8EEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zRzWHHWUjd8GGli20zAKpRHocJhLO6+h0fMpMMJ1Kdg=; b=QTDfNegnEMn1K+6SpuZK2Nv+5/kuNYeBpNUsUPU8e5vfu5AT6wfUBnCqGCviihPUZM IcmJYvrTG+uR3nuMfltdIp6BHSu71ClV2OGhtNB1cjy/yZDdXI6kQfxf6+ysvy0H4wUo ZJkA2e5xNJYszx35gpI7yljzpMsjzCwIsYMdhsAtIGzGq1BlYUOcSfFWy0N1H/4fk957 0Uh5jiIpJ7YoGXJnURMmKFsqWHlKHpkf3j39WtUDX8zYXUYOazBRbfUOUq34bLkzsh0a kQIoAFdZy8oQo6QO9csL3BJOrpVxHWL7okvIXCf/8ptc2ecaXduCEKcyDgT54vT5wOwu 488w== X-Gm-Message-State: APjAAAXntGZ7HMWkyos5AoJepcMbkDVUBlqA1v5lKlCm63vDg3Qre0UL 0vRys1QlaRhXgdFwuWiQIicbHg== X-Google-Smtp-Source: APXvYqxgLj386+NhihEkXDIpdXUve8mncnv4kKCJPtW//8AJeMuDL7yNLQ3rvwuzU8jzbvijFE8+Ww== X-Received: by 2002:ac2:5f59:: with SMTP id 25mr1185447lfz.195.1578680547459; Fri, 10 Jan 2020 10:22:27 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id w19sm1409068lfl.55.2020.01.10.10.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 10:22:26 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 2A7A410144E; Fri, 10 Jan 2020 21:22:27 +0300 (+03) Date: Fri, 10 Jan 2020 21:22:27 +0300 From: "Kirill A. Shutemov" To: David Hildenbrand Cc: Michal Hocko , Andrew Morton , Dan Williams , Vlastimil Babka , Mel Gorman , "Jin, Zhi" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: Re: [PATCH] mm/page_alloc: Skip non present sections on zone initialization Message-ID: <20200110182227.3gp7zgyd3fu7jzw6@box> References: <20200108144044.GB30379@dhcp22.suse.cz> <73437651-822f-fcec-3b96-281fb1064cf8@redhat.com> <20200110134547.v6ju5dxazknfjdj3@box> <20200110144717.xufpf4yjkjlngymy@box> <6cf49e65-ee02-7cbd-596f-ebbc057717c2@redhat.com> <20200110145454.mmgmtcy2zsrr63vh@box> <2f075639-c378-4bba-abe1-60d3c2420800@redhat.com> <20200110175519.myahx3tnxajt4eam@box> <1dfd6a03-c444-720a-17c4-049f5953acb9@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1dfd6a03-c444-720a-17c4-049f5953acb9@redhat.com> User-Agent: NeoMutt/20180716 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jan 10, 2020 at 07:05:19PM +0100, David Hildenbrand wrote: > On 10.01.20 18:55, Kirill A. Shutemov wrote: > > On Fri, Jan 10, 2020 at 03:56:14PM +0100, David Hildenbrand wrote: > >> On 10.01.20 15:54, Kirill A. Shutemov wrote: > >>> On Fri, Jan 10, 2020 at 03:48:39PM +0100, David Hildenbrand wrote: > >>>>>> + if (!present_section_nr(section_nr)) > >>>>>> + return section_nr_to_pfn(next_present_section_nr(section_nr)); > >>>>> > >>>>> This won't compile. next_present_section_nr() is static to mm/sparse.c. > >>>> > >>>> We should then move that to the header IMHO. > >>> > >>> It looks like too much for a trivial cleanup. > >>> > >> > >> Cleanup? This is a performance improvement ("fix the issue."). We should > >> avoid duplicating code where it can be avoided. > > > > My original patch is in -mm tree and fixes the issue. The thread is about > > tiding it up. > > Just send a v2? This thread is review of this patch. > > If you don't want to clean it up, I can send patches ... Please send cleanups on top. My patch is less intrusive and easier to backport if needed. -- Kirill A. Shutemov