[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21979.6150.929309.800457@quad.stoffel.home>
Date: Mon, 24 Aug 2015 09:11:34 -0400
From: "John Stoffel" <john@...ffel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: George Spelvin <linux@...izon.com>, dave@...1.net,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux@...musvillemoes.dk, peterz@...radead.org, riel@...hat.com,
rientjes@...gle.com, torvalds@...ux-foundation.org
Subject: Re: [PATCH 3/3 v4] mm/vmalloc: Cache the vmalloc memory info
>>>>> "Ingo" == Ingo Molnar <mingo@...nel.org> writes:
Ingo> * George Spelvin <linux@...izon.com> wrote:
>> First, an actual, albeit minor, bug: initializing both vmap_info_gen
>> and vmap_info_cache_gen to 0 marks the cache as valid, which it's not.
Ingo> Ha! :-) Fixed.
>> 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.
Ingo> + */
Ingo> +static DEFINE_SPINLOCK(vmap_info_lock);
Ingo> +static int vmap_info_gen = 1;
static int vmap_info_gen = VMAP_CACHE_NEEDS_UPDATE;
Ingo> +static int vmap_info_cache_gen;
Ingo> +static struct vmalloc_info vmap_info_cache;
Ingo> +#endif
This will help keep bugs like this out in the future... I hope!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists