lkml.org 
[lkml]   [2018]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 4/4] mm/sparse: Optimize memmap allocation during sparse_init()
From
Date
> +	/* The numner of present sections stored in nr_present_sections

^ "number", please.

This comment needs CodingStyle love.

> + * are kept the same since mem sections are marked as present in

^ s/are/is/

This sentence is really odd to me. What is the point? Just that we are
not making sections present? Could we just say that instead of
referring to functions and variable names?

> + * memory_present(). In this for loop, we need check which sections
> + * failed to allocate memmap or usemap, then clear its
> + * ->section_mem_map accordingly.

Rather than referring to the for loop, how about we actually comment the
code that is doing this operation?

> During this process, we need

This is missing a "to": "we need _to_ increase".

> + * increase 'nr_consumed_maps' whether its allocation of memmap
> + * or usemap failed or not, so that after we handle the i-th
> + * memory section, can get memmap and usemap of (i+1)-th section
> + * correctly. */

This makes no sense to me. Why are we incrementing 'nr_consumed_maps'
when we do not consume one?

You say that we increment it so that things will work, but not how or
why it makes things work. I'm confused.

\
 
 \ /
  Last update: 2018-06-29 19:18    [W:0.106 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site