From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Down Subject: Re: [PATCH memcg] mm/page_alloc.c: avoid statistic update with 0 Date: Tue, 12 Oct 2021 13:02:01 +0100 Message-ID: References: <29155011-f884-b0e5-218e-911039568acb@suse.cz> Mime-Version: 1.0 Return-path: 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= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: Vasily Averin Cc: Vlastimil Babka , Michal Hocko , Johannes Weiner , Vladimir Davydov , Andrew Morton , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org, Mel Gorman , Uladzislau Rezki 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.