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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8B14C433EF for ; Tue, 12 Oct 2021 12:02:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 67E6960230 for ; Tue, 12 Oct 2021 12:02:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 67E6960230 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id F1B7F940007; Tue, 12 Oct 2021 08:02:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ECB626B0073; Tue, 12 Oct 2021 08:02:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBA86940007; Tue, 12 Oct 2021 08:02:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id CD5E76B0071 for ; Tue, 12 Oct 2021 08:02:04 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8FD2818140B7C for ; Tue, 12 Oct 2021 12:02:04 +0000 (UTC) X-FDA: 78687646968.10.5F7FDAB Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by imf23.hostedemail.com (Postfix) with ESMTP id 4440090000AF for ; Tue, 12 Oct 2021 12:02:04 +0000 (UTC) Received: by mail-ed1-f44.google.com with SMTP id y12so67320393eda.4 for ; Tue, 12 Oct 2021 05:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jAcPXDzhn5XqOaTwDcEtw2GqEA7kUJwUT0gZY1JmW2E=; b=DPbfSiPVobJV2Q4NaUz4Zx8nPPKhVu6lJzZlNHK5+NGhnm7VVxJM15ZtYtoouecq+T I2rMiguacPD+JNJXmaQYRwqmIh90Lz06EG2Go8VBTHdd2K2Co3HcWaaBp2EMy/kY7cEy f1i0P0hEAeI6wW+/WCP3FKhW8YU873ZrRuk5s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jAcPXDzhn5XqOaTwDcEtw2GqEA7kUJwUT0gZY1JmW2E=; b=0HWj0mrIxkbaKsOzSMa0fez7p3lUC62U39IQubEDyVm8mww5mlb/ZDGju95dGlxPAV SLnDX31/TYz1Mz95sfwJ7Oy65DqEvsQ7ywwdernvkKdavk+0FFlcDlhPdoCb7WUZ5/RP B7yTFCfbCZ7xCe0jTzaWK/ggee3IO0jbkA0vCtivbFYwWGJPYk/TwJ8CeZ80kA0jylEH GHDT56/wBmXggiZWJ4plt+lMpyjx7nw2DXMr7uSKYUs9oMZW/K7fEb7TWQ5dmF+DOgAw Y+umRzgeu+euqUhP+gvlc6jKhJihmt37k3ixP3ioys4wEZEoD/P1dyfDV8esro8Iqndh 7tOA== X-Gm-Message-State: AOAM532LZJ06B+USgbnIGeMfqfzkEItVFwknCdMsRKBqqGc2GtosFuuC 0Wu8Ym0wVoD0ubb/kahSPwm3aQ== X-Google-Smtp-Source: ABdhPJxVaLcLFS1DQQkiZKIzmjq2hDClhDm1yvv4cdEua6mm59xty7Y5iVaFq2dyZFA3yDIYa/Hxfw== X-Received: by 2002:a05:6402:1e88:: with SMTP id f8mr37837821edf.346.1634040122488; Tue, 12 Oct 2021 05:02:02 -0700 (PDT) Received: from localhost ([2620:10d:c093:400::5:928c]) by smtp.gmail.com with ESMTPSA id l23sm4859401ejn.15.2021.10.12.05.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 05:02:02 -0700 (PDT) Date: Tue, 12 Oct 2021 13:02:01 +0100 From: Chris Down To: Vasily Averin Cc: Vlastimil Babka , Michal Hocko , Johannes Weiner , Vladimir Davydov , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@openvz.org, Mel Gorman , Uladzislau Rezki Subject: Re: [PATCH memcg] mm/page_alloc.c: avoid statistic update with 0 Message-ID: References: <29155011-f884-b0e5-218e-911039568acb@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.3 (987dde4c) (2021-09-10) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=chrisdown.name header.s=google header.b=DPbfSiPV; spf=pass (imf23.hostedemail.com: domain of chris@chrisdown.name designates 209.85.208.44 as permitted sender) smtp.mailfrom=chris@chrisdown.name; dmarc=pass (policy=none) header.from=chrisdown.name X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 4440090000AF X-Stat-Signature: ceabnmjci5m5b9mcqtz7kwcp6aydoe5i X-HE-Tag: 1634040124-576286 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: Vasily Averin writes: >Yes, it's not a bug, it just makes the kernel a bit more efficient in a very unlikely case. >However, it looks strange and makes uninformed code reviewers like me worry about possible >problems inside the affected functions. No one else calls these functions from 0. This statement is meaningless without data. If you have proof that it makes the kernel more efficient, then please provide the profiles. As it is I'd be surprised if this improved things. Either the code is hot enough that the additional branch is cumbersome, or it's cold enough that it doesn't even matter.