lkml.org 
[lkml]   [2015]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3 v4] mm/vmalloc: Cache the vmalloc memory info

George> John Stoffel <john@stoffel.org> wrote:
>>> vmap_info_gen should be initialized to 1 to force an initial
>>> cache update.

>> Blech, it should be initialized with a proper #define
>> VMAP_CACHE_NEEDS_UPDATE 1, instead of more magic numbers.

George> Er... this is a joke, right?

Not really. The comment made before was that by setting this variable
to zero, it wasn't properly initialized. Which implies that either
the API is wrong... or we should be documenting it better. I just
went in the direction of the #define instead of a comment.

George> First, this number is used exactly once, and it's not part of
George> a collection of similar numbers. And the definition would be
George> adjacent to the use.

George> We have easier ways of accomplishing that, called "comments".

Sure, that would be the better solution in this case.

George> Second, your proposed name is misleading. "needs update" is defined
George> as vmap_info_gen != vmap_info_cache_gen. There is no particular value
George> of either that has this meaning.

George> For example, initializing vmap_info_cache_gen to -1 would do just as well.
George> (I actually considered that before deciding that +1 was "simpler" than -1.)

See, I just threw out a dumb suggestion without reading the patch
properly. My fault.

George> (John, my apologies if I went over the top and am contributing to LKML's
George> reputation for flaming. I *did* actually laugh, and *do* think it's a
George> dumb idea, but my annoyance is really directed at unpleasant memories of
George> mindless application of coding style guidelines. In this case, I suspect
George> you just posted before reading carefully enough to see the subtle logic.)

Nope, I'm in the wrong here. And your comment here is wonderful, I
really do appreciate how you handled my ham fisted attempt to
contribute. But I've got thick skin and I'll keep trying in my free
time to comment on patches when I can.

John


\
 
 \ /
  Last update: 2015-08-24 18:21    [W:0.065 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site