* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
[not found] <20190807183606.372ca1a4@canb.auug.org.au>
@ 2019-08-07 15:11 ` Randy Dunlap
2019-08-07 16:59 ` Song Liu
0 siblings, 1 reply; 10+ messages in thread
From: Randy Dunlap @ 2019-08-07 15:11 UTC (permalink / raw)
To: Stephen Rothwell, Linux Next Mailing List
Cc: Linux Kernel Mailing List, Linux MM, Andrew Morton, Song Liu
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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 15:11 ` linux-next: Tree for Aug 7 (mm/khugepaged.c) Randy Dunlap
@ 2019-08-07 16:59 ` Song Liu
2019-08-07 20:10 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Song Liu @ 2019-08-07 16:59 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM, Andrew Morton
Hi Randy,
> On Aug 7, 2019, at 8:11 AM, Randy Dunlap <rdunlap@infradead.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?
Best,
Song
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 16:59 ` Song Liu
@ 2019-08-07 20:10 ` Andrew Morton
2019-08-07 21:00 ` Song Liu
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2019-08-07 20:10 UTC (permalink / raw)
To: Song Liu
Cc: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
On Wed, 7 Aug 2019 16:59:14 +0000 Song Liu <songliubraving@fb.com> wrote:
> Hi Randy,
>
> > On Aug 7, 2019, at 8:11 AM, Randy Dunlap <rdunlap@infradead.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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 20:10 ` Andrew Morton
@ 2019-08-07 21:00 ` Song Liu
2019-08-07 21:27 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Song Liu @ 2019-08-07 21:00 UTC (permalink / raw)
To: Andrew Morton
Cc: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
Hi Andrew,
> On Aug 7, 2019, at 1:10 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 7 Aug 2019 16:59:14 +0000 Song Liu <songliubraving@fb.com> wrote:
>
>> Hi Randy,
>>
>>> On Aug 7, 2019, at 8:11 AM, Randy Dunlap <rdunlap@infradead.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@fb.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@fb.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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 21:00 ` Song Liu
@ 2019-08-07 21:27 ` Andrew Morton
2019-08-07 21:30 ` Randy Dunlap
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Andrew Morton @ 2019-08-07 21:27 UTC (permalink / raw)
To: Song Liu
Cc: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
On Wed, 7 Aug 2019 21:00:04 +0000 Song Liu <songliubraving@fb.com> wrote:
> >>
> >> 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
It's all a bit confusing. I'll drop
mm-move-memcmp_pages-and-pages_identical.patch
uprobe-use-original-page-when-all-uprobes-are-removed.patch
uprobe-use-original-page-when-all-uprobes-are-removed-v2.patch
mm-thp-introduce-foll_split_pmd.patch
mm-thp-introduce-foll_split_pmd-v11.patch
uprobe-use-foll_split_pmd-instead-of-foll_split.patch
khugepaged-enable-collapse-pmd-for-pte-mapped-thp.patch
uprobe-collapse-thp-pmd-after-removing-all-uprobes.patch
Please resolve Oleg's review comments and resend everything.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 21:27 ` Andrew Morton
@ 2019-08-07 21:30 ` Randy Dunlap
2019-08-07 22:11 ` Song Liu
2019-08-07 22:13 ` Song Liu
2019-08-08 1:20 ` Stephen Rothwell
2 siblings, 1 reply; 10+ messages in thread
From: Randy Dunlap @ 2019-08-07 21:30 UTC (permalink / raw)
To: Andrew Morton, Song Liu
Cc: Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
On 8/7/19 2:27 PM, Andrew Morton wrote:
> On Wed, 7 Aug 2019 21:00:04 +0000 Song Liu <songliubraving@fb.com> wrote:
>
>>>>
>>>> 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
>
> It's all a bit confusing. I'll drop
>
> mm-move-memcmp_pages-and-pages_identical.patch
> uprobe-use-original-page-when-all-uprobes-are-removed.patch
> uprobe-use-original-page-when-all-uprobes-are-removed-v2.patch
> mm-thp-introduce-foll_split_pmd.patch
> mm-thp-introduce-foll_split_pmd-v11.patch
> uprobe-use-foll_split_pmd-instead-of-foll_split.patch
> khugepaged-enable-collapse-pmd-for-pte-mapped-thp.patch
> uprobe-collapse-thp-pmd-after-removing-all-uprobes.patch
>
> Please resolve Oleg's review comments and resend everything.
>
OK, that will take care of the build error that I am still seeing
when SHMEM is not enabled:
../mm/khugepaged.c:1849:2: note: in expansion of macro ‘BUILD_BUG’
BUILD_BUG();
^~~~~~~~~
--
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 21:30 ` Randy Dunlap
@ 2019-08-07 22:11 ` Song Liu
2019-08-08 1:31 ` Stephen Rothwell
0 siblings, 1 reply; 10+ messages in thread
From: Song Liu @ 2019-08-07 22:11 UTC (permalink / raw)
To: Randy Dunlap
Cc: Andrew Morton, Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
> On Aug 7, 2019, at 2:30 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 8/7/19 2:27 PM, Andrew Morton wrote:
>> On Wed, 7 Aug 2019 21:00:04 +0000 Song Liu <songliubraving@fb.com> wrote:
>>
>>>>>
>>>>> 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
>>
>> It's all a bit confusing. I'll drop
>>
>> mm-move-memcmp_pages-and-pages_identical.patch
>> uprobe-use-original-page-when-all-uprobes-are-removed.patch
>> uprobe-use-original-page-when-all-uprobes-are-removed-v2.patch
>> mm-thp-introduce-foll_split_pmd.patch
>> mm-thp-introduce-foll_split_pmd-v11.patch
>> uprobe-use-foll_split_pmd-instead-of-foll_split.patch
>> khugepaged-enable-collapse-pmd-for-pte-mapped-thp.patch
>> uprobe-collapse-thp-pmd-after-removing-all-uprobes.patch
>>
>> Please resolve Oleg's review comments and resend everything.
>>
>
> OK, that will take care of the build error that I am still seeing
> when SHMEM is not enabled:
>
> ../mm/khugepaged.c:1849:2: note: in expansion of macro ‘BUILD_BUG’
> BUILD_BUG();
> ^~~~~~~~~
This was broken by one of my other patch. Sorry!
The following patch (on top of linux-next/master) fixes it.
Thanks,
Song
================= 8< ==============================
From 4d6e3a3a28bf85b1debbb90c55f66c81e9ebb9ec Mon Sep 17 00:00:00 2001
From: Song Liu <songliubraving@fb.com>
Date: Wed, 7 Aug 2019 14:57:38 -0700
Subject: [PATCH] khugepaged: fix build without CONFIG_SHMEM
khugepaged_scan_file() should be fully bypassed without CONFIG_SHMEM.
Fixes: f57286140d96 ("mm,thp: add read-only THP support for (non-shmem) FS")
Signed-off-by: Song Liu <songliubraving@fb.com>
---
mm/khugepaged.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 272fed3ed0f0..40c25ddf29e4 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1778,7 +1778,7 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages,
VM_BUG_ON(khugepaged_scan.address < hstart ||
khugepaged_scan.address + HPAGE_PMD_SIZE >
hend);
- if (vma->vm_file) {
+ if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file) {
struct file *file;
pgoff_t pgoff = linear_page_index(vma,
khugepaged_scan.address);
--
2.17.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 21:27 ` Andrew Morton
2019-08-07 21:30 ` Randy Dunlap
@ 2019-08-07 22:13 ` Song Liu
2019-08-08 1:20 ` Stephen Rothwell
2 siblings, 0 replies; 10+ messages in thread
From: Song Liu @ 2019-08-07 22:13 UTC (permalink / raw)
To: Andrew Morton
Cc: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
> On Aug 7, 2019, at 2:27 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 7 Aug 2019 21:00:04 +0000 Song Liu <songliubraving@fb.com> wrote:
>
>>>>
>>>> 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
>
> It's all a bit confusing. I'll drop
Agreed this is confusing.
>
> mm-move-memcmp_pages-and-pages_identical.patch
> uprobe-use-original-page-when-all-uprobes-are-removed.patch
> uprobe-use-original-page-when-all-uprobes-are-removed-v2.patch
> mm-thp-introduce-foll_split_pmd.patch
> mm-thp-introduce-foll_split_pmd-v11.patch
> uprobe-use-foll_split_pmd-instead-of-foll_split.patch
> khugepaged-enable-collapse-pmd-for-pte-mapped-thp.patch
> uprobe-collapse-thp-pmd-after-removing-all-uprobes.patch
>
> Please resolve Oleg's review comments and resend everything.
Will do.
Thanks,
Song
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 21:27 ` Andrew Morton
2019-08-07 21:30 ` Randy Dunlap
2019-08-07 22:13 ` Song Liu
@ 2019-08-08 1:20 ` Stephen Rothwell
2 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2019-08-08 1:20 UTC (permalink / raw)
To: Andrew Morton
Cc: Song Liu, Randy Dunlap, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
Hi Andrew,
On Wed, 7 Aug 2019 14:27:55 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> It's all a bit confusing. I'll drop
>
> mm-move-memcmp_pages-and-pages_identical.patch
> uprobe-use-original-page-when-all-uprobes-are-removed.patch
> uprobe-use-original-page-when-all-uprobes-are-removed-v2.patch
> mm-thp-introduce-foll_split_pmd.patch
> mm-thp-introduce-foll_split_pmd-v11.patch
> uprobe-use-foll_split_pmd-instead-of-foll_split.patch
> khugepaged-enable-collapse-pmd-for-pte-mapped-thp.patch
> uprobe-collapse-thp-pmd-after-removing-all-uprobes.patch
I have dropped them all from linux-next today.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Aug 7 (mm/khugepaged.c)
2019-08-07 22:11 ` Song Liu
@ 2019-08-08 1:31 ` Stephen Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2019-08-08 1:31 UTC (permalink / raw)
To: Song Liu
Cc: Randy Dunlap, Andrew Morton, Linux Next Mailing List,
Linux Kernel Mailing List, Linux MM
[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]
Hi Song,
On Wed, 7 Aug 2019 22:11:28 +0000 Song Liu <songliubraving@fb.com> wrote:
>
> From: Song Liu <songliubraving@fb.com>
> Date: Wed, 7 Aug 2019 14:57:38 -0700
> Subject: [PATCH] khugepaged: fix build without CONFIG_SHMEM
>
> khugepaged_scan_file() should be fully bypassed without CONFIG_SHMEM.
>
> Fixes: f57286140d96 ("mm,thp: add read-only THP support for (non-shmem) FS")
> Signed-off-by: Song Liu <songliubraving@fb.com>
> ---
> mm/khugepaged.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index 272fed3ed0f0..40c25ddf29e4 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -1778,7 +1778,7 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages,
> VM_BUG_ON(khugepaged_scan.address < hstart ||
> khugepaged_scan.address + HPAGE_PMD_SIZE >
> hend);
> - if (vma->vm_file) {
> + if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file) {
> struct file *file;
> pgoff_t pgoff = linear_page_index(vma,
> khugepaged_scan.address);
I have applied this to linux-next today (it needed a little adjusting
after removing the other patches).
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-08-08 1:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190807183606.372ca1a4@canb.auug.org.au>
2019-08-07 15:11 ` linux-next: Tree for Aug 7 (mm/khugepaged.c) Randy Dunlap
2019-08-07 16:59 ` Song Liu
2019-08-07 20:10 ` Andrew Morton
2019-08-07 21:00 ` Song Liu
2019-08-07 21:27 ` Andrew Morton
2019-08-07 21:30 ` Randy Dunlap
2019-08-07 22:11 ` Song Liu
2019-08-08 1:31 ` Stephen Rothwell
2019-08-07 22:13 ` Song Liu
2019-08-08 1:20 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).