Re: [PATCH v1 1/3] mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0

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

 



David Hildenbrand <david@xxxxxxxxxx> writes:

>>> I understand we want to keep the name "symmetric" with
>>> ksm_enable_merge_any, but it also unmerges the ksm pages. Do we want to
>>> reflect that in the function name?
>> ksm_disable_merge_any_umerge() is suboptimal.
>> As ksm_disable_merge_any() now reverts what ksm_enable_merge_any() ended
>> up doing, I think it's just fine.
>> (it would be a different story if we'd be using "set" / "clear"
>> terminology instead of "enable" / "disable").
>> We can describe that in the comment.
>>
>>>
>>> Can we add a comment for the function?
>> Can do for symmetry with ksm_enable_merge_any().
>>
>
> +/**
> + * ksm_disable_merge_any - Disable merging on all compatible VMA's of the mm,
> + *                        previously enabled via ksm_enable_merge_any().
> + *
> + * Disabling merging implies unmerging any merged pages, like setting
> + * MADV_UNMERGEABLE would. If unmerging fails, the whole operation fails and
> + * merging on all compatible VMA's remains enabled.
> + *
> + * @mm: Pointer to mm
> + *
> + * Returns 0 on success, otherwise error code
> + */


LGTM

Acked-by: Stefan Roesch <shr@xxxxxxxxxxxx>



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux