Re: [PATCH] mm/compaction: fix missed direct_compaction setting for non-direct compaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/29/19 9:48 AM, Yafang Shao wrote:
> On Fri, Mar 29, 2019 at 4:45 PM Vlastimil Babka <vbabka@xxxxxxx> wrote:
>>
>> On 3/29/19 9:36 AM, Yafang Shao wrote:
>>> direct_compaction is not initialized for kcompactd or manually triggered
>>> compaction (via /proc or /sys).
>>
>> It doesn't need to, this style of initialization does guarantee that any
>> field not explicitly mentioned is initialized to 0/NULL/false... and
>> this pattern is used all over the kernel.
>>
> 
> Hmm.
> You mean the gcc will set the local variable to 0 ?

Not local variable, but fields omitted in this "designated initializers"
scenario.

> Are there any reference to this behavior ?

https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

"Omitted fields are implicitly initialized the same as for objects that
have static storage duration. "
and static objects are implicitly 0




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux