lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BB7412DE-A88E-41A4-9796-5ECEADE31571@fb.com>
Date:   Wed, 7 Aug 2019 21:00:04 +0000
From:   Song Liu <songliubraving@...com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     Randy Dunlap <rdunlap@...radead.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux MM <linux-mm@...ck.org>
Subject: Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)

Hi Andrew,

> On Aug 7, 2019, at 1:10 PM, Andrew Morton <akpm@...ux-foundation.org> wrote:
> 
> On Wed, 7 Aug 2019 16:59:14 +0000 Song Liu <songliubraving@...com> wrote:
> 
>> Hi Randy,
>> 
>>> On Aug 7, 2019, at 8:11 AM, Randy Dunlap <rdunlap@...radead.org> wrote:
>>> 
>>> On 8/7/19 1:36 AM, Stephen Rothwell wrote:
>>>> Hi all,
>>>> 
>>>> Changes since 20190806:
>>>> 
>>> 
>>> on i386:
>>> 
>>> when CONFIG_SHMEM is not set/enabled:
>>> 
>>> ../mm/khugepaged.c: In function ‘khugepaged_scan_mm_slot’:
>>> ../mm/khugepaged.c:1874:2: error: implicit declaration of function ‘khugepaged_collapse_pte_mapped_thps’; did you mean ‘collapse_pte_mapped_thp’? [-Werror=implicit-function-declaration]
>>> khugepaged_collapse_pte_mapped_thps(mm_slot);
>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 
>> Thanks for the report. 
>> 
>> Shall I resend the patch, or shall I send fix on top of current patch?
> 
> Either is OK.  If the difference is small I will turn it into an
> incremental patch so that I (and others) can see what changed.

Please find the patch to fix this at the end of this email. It applies 
right on top of "khugepaged: enable collapse pmd for pte-mapped THP". 
It may conflict a little with the "Enable THP for text section of 
non-shmem files" set, which renames function khugepaged_scan_shmem(). 

Also, I found v3 of the set in linux-next. The latest is v4:

https://lkml.org/lkml/2019/8/2/1587
https://lkml.org/lkml/2019/8/2/1588
https://lkml.org/lkml/2019/8/2/1589

Thanks,
Song

======== 8< ===========

From 26715c923f6cd283a2950cfd0a7cca483a3eb406 Mon Sep 17 00:00:00 2001
From: Song Liu <songliubraving@...com>
Date: Wed, 7 Aug 2019 10:21:30 -0700
Subject: [PATCH] khugepaged: fix build without CONFIG_SHMEM

Without CONFIG_SHMEM, we need dummy khugepaged_collapse_pte_mapped_thps.

Signed-off-by: Song Liu <songliubraving@...com>
---
 mm/khugepaged.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index ba36ff5c1d82..086323112c07 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1764,6 +1764,11 @@ static void khugepaged_scan_shmem(struct mm_struct *mm,
 {
        BUILD_BUG();
 }
+
+static int khugepaged_collapse_pte_mapped_thps(struct mm_slot *mm_slot)
+{
+       return 0;
+}
 #endif

 static unsigned int khugepaged_scan_mm_slot(unsigned int pages,
--
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ