[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181114071052.GA23419@dhcp22.suse.cz>
Date: Wed, 14 Nov 2018 08:10:52 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Kyungtae Kim <kt0755@...il.com>, pavel.tatashin@...rosoft.com,
vbabka@...e.cz, osalvador@...e.de, rppt@...ux.vnet.ibm.com,
aaron.lu@...el.com, iamjoonsoo.kim@....com,
alexander.h.duyck@...ux.intel.com, mgorman@...hsingularity.net,
lifeasageek@...il.com, threeearcat@...il.com,
syzkaller@...glegroups.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Subject: Re: UBSAN: Undefined behaviour in mm/page_alloc.c
On Tue 13-11-18 15:29:41, Andrew Morton wrote:
[...]
> But do we really need to do this? Are there any other known potential
> callsites?
The main point is that the code as it stands is quite fragile, isn't it?
Fixing up all the callers is possible but can you actually think of a
reason why this would cause any measurable effect in the fast path?
The order argument is usually in a register and comparing it to a number
with unlikely branch should be hardly something visible.
Besides that we are talking few cycles at best compared to a fragile
code that got broken by accident without anybody noticing for quite some
time.
I vote for the maintainability over few cycles here. Should anybody find
this measurable we can rework the code by other means.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists