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.5 required=3.0 tests=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 A9CC9C433E0 for ; Mon, 22 Jun 2020 10:04:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 79B8A20706 for ; Mon, 22 Jun 2020 10:04:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79B8A20706 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 01DD36B0002; Mon, 22 Jun 2020 06:04:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F10A06B0003; Mon, 22 Jun 2020 06:04:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E264A6B0005; Mon, 22 Jun 2020 06:04:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id D9FD96B0002 for ; Mon, 22 Jun 2020 06:04:44 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 62DBE180AD81D for ; Mon, 22 Jun 2020 10:04:44 +0000 (UTC) X-FDA: 76956413688.29.vase94_43005c226e32 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 3908418086E22 for ; Mon, 22 Jun 2020 10:04:44 +0000 (UTC) X-HE-Tag: vase94_43005c226e32 X-Filterd-Recvd-Size: 3098 Received: from outbound-smtp21.blacknight.com (outbound-smtp21.blacknight.com [81.17.249.41]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Mon, 22 Jun 2020 10:04:43 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp21.blacknight.com (Postfix) with ESMTPS id 3A932CCBF3 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) X-Rspamd-Queue-Id: 3908418086E22 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000634, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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