Re: [PATCH v5 1/3] mm: add new api to enable ksm per process

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

 



Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes:

> On Thu,  6 Apr 2023 09:53:37 -0700 Stefan Roesch <shr@xxxxxxxxxxxx> wrote:
>
>> So far KSM can only be enabled by calling madvise for memory regions.  To
>> be able to use KSM for more workloads, KSM needs to have the ability to be
>> enabled / disabled at the process / cgroup level.
>>
>> ...
>>
>> @@ -53,6 +62,18 @@ void folio_migrate_ksm(struct folio *newfolio, struct folio *folio);
>>
>>  #else  /* !CONFIG_KSM */
>>
>> +static inline int ksm_add_mm(struct mm_struct *mm)
>> +{
>> +}
>
> The compiler doesn't like the lack of a return value.
>
> I queued up a patch to simply delete the above function - seems that
> ksm_add_mm() has no callers if CONFIG_KSM=n.
>
> The same might be true of the ksm_add_vma()...ksm_exit() stubs also,
> Perhaps some kind soul could take a look at whether we can simply clean
> those out.

ksm_add_mm() and ksm_add_vmas() is not needed.
However ksm_add_vma() is required. It is called from mm/mmap.c



[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