Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2623582ybt; Mon, 22 Jun 2020 03:09:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoCI6LTWDfaezK1gIy5i0qvoc3wxGMszJuIEFtgXlqFbNhNzXDya+ls5utPyEtwiCJLiPC X-Received: by 2002:aa7:c74e:: with SMTP id c14mr15713842eds.322.1592820544608; Mon, 22 Jun 2020 03:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592820544; cv=none; d=google.com; s=arc-20160816; b=ihmXs890fY4N9hhxFU5vK7zOdj/ZXpxZ+xalR4D4fPdSBBByYNhHWZThG8aLbmHP2Z 2dHy3Lf7VJnx8COPCSbcYz9XjwdtM7L5xhp8e4I7M1cMI/4fHldp/XszVxO9Qd46MziA lBMkEHSj2ujJVFGKblVsyqJti+FQamZxi1ARwQRsjWbskozteSL8gd+cppsLet5H/DKB LDgOv7x+l5/aSC4/XI/8KrosSo0exITjfC/oGLEck6KlfdCQ8A/J7Dheuvkcm6WF4f1j j22qZzKHC7pd+hvVAKl3ff9hts692bNgkg5WD04nB0lBnhNrJmn4MYte2rTJaMTf+QQo 098A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wDExbcBAa78IiayPdd5IaGhZjIto0F7+sPzuoIlfu0Q=; b=lC+Ws1B9wDSG9VB6OtnrFUlsgXeL4TU8rS5nG+sFaJFmwDqjZDkVttDKRo6yuThTGV fP9uSwkgyWZ7kyMavhO1/3/J5YhwlZqw3yxUcgt9X6LfSo+bSXVKBc+kg87ckb7R83ut HDRk3NbHZbq0AH+5efNO+d23X70lVoRi9R2jaqTDKHUPCv1Jv0Wh0CIt4UKvK4Y0o516 5t8kOr9dHq6VysXceNduZtD0JrkbQik7NFxqa5RSmHbISSYawE0V3HDXNBQ2T/5Hc6ES mxejrXGSg/71jkJ4CwqDK1Zwj6KGv60XkaqgCWXlX98OILF6vBbkgZIpgPFaPo+9AGeP OrwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jt19si9046120ejb.389.2020.06.22.03.08.41; Mon, 22 Jun 2020 03:09:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727024AbgFVKEo (ORCPT + 99 others); Mon, 22 Jun 2020 06:04:44 -0400 Received: from outbound-smtp57.blacknight.com ([46.22.136.241]:52695 "EHLO outbound-smtp57.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726942AbgFVKEo (ORCPT ); Mon, 22 Jun 2020 06:04:44 -0400 Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp57.blacknight.com (Postfix) with ESMTPS id 4739BFAE92 for ; Mon, 22 Jun 2020 11:04:42 +0100 (IST) Received: (qmail 13230 invoked from network); 22 Jun 2020 10:04:42 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.18.5]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 22 Jun 2020 10:04:41 -0000 Date: Mon, 22 Jun 2020 11:04:39 +0100 From: Mel Gorman To: ????????? Cc: Michal Hocko , "vbabka@suse.cz" , "bhe@redhat.com" , "minchan@kernel.org" , "mgorman@suse.de" , "hannes@cmpxchg.org" , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "jaewon31.kim@gmail.com" , ????????? , ????????? Subject: Re: [PATCH v4] page_alloc: consider highatomic reserve in watermark fast Message-ID: <20200622100439.GQ3183@techsingularity.net> References: <20200622091107.GC31426@dhcp22.suse.cz> <20200619235958.11283-1-jaewon31.kim@samsung.com> <20200622094020epcms1p639cc33933fbb7a9d578adb16a6ea0734@epcms1p6> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20200622094020epcms1p639cc33933fbb7a9d578adb16a6ea0734@epcms1p6> 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 Mon, Jun 22, 2020 at 06:40:20PM +0900, ????????? wrote: > >But more importantly, I have hard time to follow why we need both > >zone_watermark_fast and zone_watermark_ok now. They should be > >essentially the same for anything but order == 0. For order 0 the > >only difference between the two is that zone_watermark_ok checks for > >ALLOC_HIGH resp ALLOC_HARDER, ALLOC_OOM. So what is exactly fast about > >the former and why do we need it these days? > > > > I think the author, Mel, may ansewr. But I think the wmark_fast may > fast by 1) not checking more condition about wmark and 2) using inline > rather than function. According to description on commit 48ee5f3696f6, > it seems to bring about 4% improvement. > The original intent was that watermark checks were expensive as some of the calculations are only necessary when a zone is relatively low on memory and the check does not always have to be 100% accurate. This is probably still true given that __zone_watermark_ok() makes a number of calculations depending on alloc flags even if a zone is almost completely free. -- Mel Gorman SUSE Labs