Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2357830pxb; Tue, 12 Oct 2021 05:05:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcbv4Wm5BVgfgaymfywXOGM2tVOkbIGtTeqAqDjJc9OLyyZfzjHVVGSPk37P0aprScvVHu X-Received: by 2002:adf:ca10:: with SMTP id o16mr29602829wrh.212.1634040307055; Tue, 12 Oct 2021 05:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634040306; cv=none; d=google.com; s=arc-20160816; b=q0/B/NXGTQinto4afZLsQHS059uSBH8GXTIEtfn1IZfWRjR+XV12g8T1LhxN62G014 IELgbRFOmvNEo4XdrjWMjK1GDsCmOa+8UGLIHURpfQY758Y7ediv2T0TAQb2ZPs6dR0q i5nWVgu9SdrLC4UDLw7CC4Tm69oHaKRgwkk+iNoMOPrIndC7nvzEY5CejLcyZ5B27WuR UPVQ+OkuMMuul67HwU5/yDJX+8q1mEkjiCtP6J85DmYiqbVWIm2ua2p7BC7heNT9FdVW bCZsVZt5pYOEOfnghTN0c1BqBC9FrnDaeDeQ0vHDH9ORjZEfjv5gmljqaLx+ASLwFoZ3 8cTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jAcPXDzhn5XqOaTwDcEtw2GqEA7kUJwUT0gZY1JmW2E=; b=DjDGqZxxb4/IokfjA8qFlfOIkKo+s84WMPXp1/K0CtHGgAaov5R/bcT3Qs2ridPPCw 7lmEH6JICapYngWGhMDFHep2jPc9a5XQSpBCHC6PZIcCDfOjoH6JRhtxWYjattvVRuHx u1QqRNR58stmR5Iq7cJTHoQAHH1ap+D2QgB6ItaVI0Cwcx1yYQBKRil2GvWnXR+vnsiA g87dsvubQSm8HXgQEPNNfMg+F0mKq4uPXVRbqyVNw+bSI6U/qecD4gaaVfodTAoWpQgg D7C8x0N+1CuW06wVB5uoZ+G3mcpD0FUwzCtnNu6LbjIKoSabBQuuZKCyWc8d51QRkXXm HLOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=DPbfSiPV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si14213902edr.281.2021.10.12.05.04.28; Tue, 12 Oct 2021 05:05:06 -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; dkim=pass header.i=@chrisdown.name header.s=google header.b=DPbfSiPV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236307AbhJLMEK (ORCPT + 99 others); Tue, 12 Oct 2021 08:04:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236297AbhJLMEJ (ORCPT ); Tue, 12 Oct 2021 08:04:09 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 144ECC06161C for ; Tue, 12 Oct 2021 05:02:08 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id g8so80236008edt.7 for ; Tue, 12 Oct 2021 05:02:08 -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=at99S8FTeYozpui2Ew56fOyiQrcGrNKOWg04XjAk+wSjxk0tWxY35cxc0xVF5uUoDY oQtsbhl8MJb1H2yyrPejwh+sMyXIdm9cpdZRfd29LXrCLhuPWx1Z/OeKD05Vz/03aDQn 10CRzIFh3Gz/R6hKl2OB9GQ5OlVLoq3MzxhI0wTkLremKuy8jW0FG429hBNZIv2W9dor 0fPllAGgLZ9nsMBtqNVB7rn3f7Sy3A7zepymQTq1xKhD+cCX0k1m0U8Rfvt/1ePnL0zc nE26Hu/7k2wG/zmCh3PvJw2VlS/MgjyfUn8sv4hqSyBeS91yeIDd85K9LDeO1hNgRamp E0og== X-Gm-Message-State: AOAM5316sJxlz5Pg9cOH7/4rpVK+7KfUQPlGeS42JXltFpEfj5kjBaL7 YPk7H1DVAxmfpI21Ivo4qGU+oA== 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.