[PATCH] mm: trivial mark_page_accessed() cleanup

2019-10-16 Thread Fengguang Wu
This avoids duplicated PageReferenced() calls. No behavior change. Signed-off-by: Fengguang Wu --- mm/swap.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index 38a52b9..c55720c 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -373,9 +373,15

Re: [PATCH for vm-scalability] usemem: Add new option -Z|--read-again

2019-09-14 Thread Fengguang Wu
Applied, thanks Teawater! On Sat, Sep 14, 2019 at 11:07:18AM +0800, Hui Zhu wrote: usemem will read memory again after access the memory with this option. It can help test the speed that load page from swap to memory. Signed-off-by: Hui Zhu --- usemem.c | 46

Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node

2019-05-01 Thread Fengguang Wu
On Wed, Apr 17, 2019 at 11:17:48AM +0200, Michal Hocko wrote: On Tue 16-04-19 12:19:21, Yang Shi wrote: On 4/16/19 12:47 AM, Michal Hocko wrote: [...] > Why cannot we simply demote in the proximity order? Why do you make > cpuless nodes so special? If other close nodes are vacant then just

Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node

2019-04-30 Thread Fengguang Wu
On Thu, Apr 18, 2019 at 11:02:27AM +0200, Michal Hocko wrote: On Wed 17-04-19 13:43:44, Yang Shi wrote: [...] And, I'm wondering whether this optimization is also suitable to general NUMA balancing or not. If there are convincing numbers then this should be a preferable way to deal with it.

Re: [RFC PATCH] mm: readahead: add readahead_shift into backing device

2019-03-25 Thread Fengguang Wu
On Mon, Mar 25, 2019 at 09:59:31AM -0700, Mark Salyzyn wrote: On 03/25/2019 05:16 AM, Fengguang Wu wrote: Martin, On Fri, Mar 22, 2019 at 11:46:11PM +0800, Martin Liu wrote: As the discussion https://lore.kernel.org/patchwork/patch/334982/ We know an open file's ra_pages might run out of sync

Re: [LSF/MM ATTEND ] memory reclaim with NUMA rebalancing

2019-02-23 Thread Fengguang Wu
On Sat, Feb 23, 2019 at 09:27:48PM +0800, Fengguang Wu wrote: On Thu, Jan 31, 2019 at 12:19:47PM +0530, Aneesh Kumar K.V wrote: Michal Hocko writes: Hi, I would like to propose the following topic for the MM track. Different group of people would like to use NVIDMMs as a low cost & sl

Re: [LSF/MM ATTEND ] memory reclaim with NUMA rebalancing

2019-02-23 Thread Fengguang Wu
s Numa nodes 2. The patch series from Dave Hansen which just uses Pmem as Numa node. 3. The patch series from Fengguang Wu which does prevent default allocation from these numa nodes by excluding them from zone list. 4. The patch series from Jerome Glisse which doesn't expose these as numa n

Re: [RFC][PATCH v2 14/21] kvm: register in mm_struct

2019-02-02 Thread Fengguang Wu
Hi Peter, On Sat, Feb 02, 2019 at 02:57:41PM +0800, Peter Xu wrote: On Wed, Dec 26, 2018 at 09:15:00PM +0800, Fengguang Wu wrote: VM is associated with an address space and not a specific thread. >From Documentation/virtual/kvm/api.txt: Only run VM ioctls from the same process (addr

Re: [RFC][PATCH v2 00/21] PMEM NUMA node and hotness accounting/migration

2019-01-28 Thread Fengguang Wu
Hi Jonathan, Thanks for showing the gap on tracking hot accesses from devices. On Mon, Jan 28, 2019 at 05:42:39PM +, Jonathan Cameron wrote: On Wed, 2 Jan 2019 12:21:10 + Jonathan Cameron wrote: On Fri, 28 Dec 2018 20:52:24 +0100 Michal Hocko wrote: > [Ccing Mel and Andrea] >

Re: [PATCH 0/4] Allow persistent memory to be used like normal RAM

2019-01-18 Thread Fengguang Wu
With this patch set, an unmodified application would either use: 1) whatever memory it happened to get 2) only the faster dram (via numactl --membind=) 3) only the slower pmem (again, via numactl --membind1) 4) preferentially one or the other (numactl --preferred=) Yet another option:

Re: [RFC][PATCH v2 11/21] kvm: allocate page table pages from DRAM

2019-01-07 Thread Fengguang Wu
On Wed, Jan 02, 2019 at 08:47:25AM -0800, Dave Hansen wrote: On 12/26/18 5:14 AM, Fengguang Wu wrote: +static unsigned long __get_dram_free_pages(gfp_t gfp_mask) +{ + struct page *page; + + page = __alloc_pages(GFP_KERNEL_ACCOUNT, 0, numa_node_id()); + if (!page

Re: [RFC][PATCH v2 10/21] mm: build separate zonelist for PMEM and DRAM node

2019-01-07 Thread Fengguang Wu
On Tue, Jan 01, 2019 at 02:44:41PM +0530, Aneesh Kumar K.V wrote: Fengguang Wu writes: From: Fan Du When allocate page, DRAM and PMEM node should better not fall back to each other. This allows migration code to explicitly control which type of node to allocate pages from. With this patch

Re: [PATCH] printk: Add caller information to printk() output.

2019-01-03 Thread Fengguang Wu
On Thu, Jan 03, 2019 at 07:27:41PM +0100, Dmitry Vyukov wrote: On Wed, Jan 2, 2019 at 5:09 PM Dmitry Vyukov wrote: On Tue, Dec 18, 2018 at 9:58 AM Sergey Senozhatsky wrote: > > On (12/18/18 09:39), Petr Mladek wrote: > > > > Sergey, are you okay with this squashed patch, please? > > > >

Re: [RFC][PATCH v2 00/21] PMEM NUMA node and hotness accounting/migration

2018-12-28 Thread Fengguang Wu
> I haven't looked at the implementation yet but if you are proposing a > special cased zone lists then this is something CDM (Coherent Device > Memory) was trying to do two years ago and there was quite some > skepticism in the approach. It looks we are pretty different than CDM. :) We creating

Re: [RFC][PATCH v2 00/21] PMEM NUMA node and hotness accounting/migration

2018-12-28 Thread Fengguang Wu
Set PROT_NONE on the PTEs that map to the page, and do the actual migration in the context of process which initiate migration. Signed-off-by: Liu Jingqi Signed-off-by: Fengguang Wu --- mm/migrate.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/mm/migrate.c b/mm/migrate.c in

Re: [RFC][PATCH v2 00/21] PMEM NUMA node and hotness accounting/migration

2018-12-28 Thread Fengguang Wu
On Fri, Dec 28, 2018 at 09:41:05AM +0100, Michal Hocko wrote: On Fri 28-12-18 13:08:06, Wu Fengguang wrote: [...] Optimization: do hot/cold page tracking and migration = Since PMEM is slower than DRAM, we need to make sure hot pages go to

Re: [RFC][PATCH v2 00/21] PMEM NUMA node and hotness accounting/migration

2018-12-27 Thread Fengguang Wu
On Thu, Dec 27, 2018 at 09:31:58PM +0100, Michal Hocko wrote: On Wed 26-12-18 21:14:46, Wu Fengguang wrote: This is an attempt to use NVDIMM/PMEM as volatile NUMA memory that's transparent to normal applications and virtual machines. The code is still in active development. It's provided for

Re: [RFC][PATCH v2 01/21] e820: cheat PMEM as DRAM

2018-12-27 Thread Fengguang Wu
On Thu, Dec 27, 2018 at 11:32:06AM -0800, Yang Shi wrote: On Wed, Dec 26, 2018 at 9:13 PM Dan Williams wrote: On Wed, Dec 26, 2018 at 8:11 PM Fengguang Wu wrote: > > On Wed, Dec 26, 2018 at 07:41:41PM -0800, Matthew Wilcox wrote: > >On Wed, Dec 26, 2018 at 09:14:47PM +0800,

Re: [RFC][PATCH v2 08/21] mm: introduce and export pgdat peer_node

2018-12-27 Thread Fengguang Wu
On Thu, Dec 27, 2018 at 08:07:26PM +, Christopher Lameter wrote: On Wed, 26 Dec 2018, Fengguang Wu wrote: Each CPU socket can have 1 DRAM and 1 PMEM node, we call them "peer nodes". Migration between DRAM and PMEM will by default happen between peer nodes. Which one does nu

Re: [RFC][PATCH v2 01/21] e820: cheat PMEM as DRAM

2018-12-26 Thread Fengguang Wu
On Wed, Dec 26, 2018 at 07:41:41PM -0800, Matthew Wilcox wrote: On Wed, Dec 26, 2018 at 09:14:47PM +0800, Fengguang Wu wrote: From: Fan Du This is a hack to enumerate PMEM as NUMA nodes. It's necessary for current BIOS that don't yet fill ACPI HMAT table. WARNING: take care to backup

[RFC][PATCH v2 12/21] x86/pgtable: allocate page table pages from DRAM

2018-12-26 Thread Fengguang Wu
On rand read/writes on large data, we find near half memory accesses caused by TLB misses, hence hit the page table pages. So better keep page table pages in faster DRAM nodes. Signed-off-by: Fengguang Wu --- arch/x86/include/asm/pgalloc.h | 10 +++--- arch/x86/mm/pgtable.c

[RFC][PATCH v2 07/21] mm: export node type {pmem|dram} under /sys/bus/node

2018-12-26 Thread Fengguang Wu
/devices/system/node/*/peer_node /sys/devices/system/node/node0/peer_node:2 /sys/devices/system/node/node1/peer_node:3 /sys/devices/system/node/node2/peer_node:0 /sys/devices/system/node/node3/peer_node:1 Signed-off-by: Fan Du Signed-off-by: Fengguang Wu --- drivers/base/node.c | 10

[RFC][PATCH v2 03/21] x86/numa_emulation: fix fake NUMA in uniform case

2018-12-26 Thread Fengguang Wu
From: Fan Du The index of numa_meminfo is expected to the same as of numa_meminfo.blk[]. and numa_remove_memblk_from break the expectation. 2S system does not break, because before numa_remove_memblk_from index nid 0 0 1 1 after numa_remove_memblk_from index nid 0 1 1

[RFC][PATCH v2 11/21] kvm: allocate page table pages from DRAM

2018-12-26 Thread Fengguang Wu
From: Yao Yuan Signed-off-by: Yao Yuan Signed-off-by: Fengguang Wu --- arch/x86/kvm/mmu.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) --- linux.orig/arch/x86/kvm/mmu.c 2018-12-26 20:54:48.846720344 +0800 +++ linux/arch/x86/kvm/mmu.c2018-12-26 20:54

[RFC][PATCH v2 05/21] mmzone: new pgdat flags for DRAM and PMEM

2018-12-26 Thread Fengguang Wu
From: Fan Du One system with DRAM and PMEM, we need new flag to tag pgdat is made of DRAM or peristent memory. This patch serves as preparetion one for follow up patch. Signed-off-by: Fan Du Signed-off-by: Fengguang Wu --- include/linux/mmzone.h | 26 ++ 1 file

[RFC][PATCH v2 08/21] mm: introduce and export pgdat peer_node

2018-12-26 Thread Fengguang Wu
peer node. User space may also be able to infer promotion/demotion targets based on future HMAT info. Signed-off-by: Fan Du Signed-off-by: Fengguang Wu --- drivers/base/node.c| 11 +++ include/linux/mmzone.h | 12 mm/page_alloc.c| 29 ++

[RFC][PATCH v2 18/21] kvm-ept-idle: enable module

2018-12-26 Thread Fengguang Wu
Signed-off-by: Fengguang Wu --- arch/x86/kvm/Kconfig | 11 +++ arch/x86/kvm/Makefile |4 2 files changed, 15 insertions(+) --- linux.orig/arch/x86/kvm/Kconfig 2018-12-23 20:09:04.628882396 +0800 +++ linux/arch/x86/kvm/Kconfig 2018-12-23 20:09:04.628882396 +0800 @@ -96,6

[RFC][PATCH v2 01/21] e820: cheat PMEM as DRAM

2018-12-26 Thread Fengguang Wu
-by: Fengguang Wu --- arch/x86/kernel/e820.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux.orig/arch/x86/kernel/e820.c 2018-12-23 19:20:34.587078783 +0800 +++ linux/arch/x86/kernel/e820.c2018-12-23 19:20:34.587078783 +0800 @@ -403,7 +403,8 @@ static int __init

[RFC][PATCH v2 09/21] mm: avoid duplicate peer target node

2018-12-26 Thread Fengguang Wu
15: 28 28 28 28 17 17 17 17 28 28 28 28 10 10 10 10 Signed-off-by: Fengguang Wu --- mm/page_alloc.c |6 ++ 1 file changed, 6 insertions(+) --- linux.orig/mm/page_alloc.c 2018-12-23 19:48:27.366110325 +0800 +++ linux/mm/page_alloc.c 2018-12-23 19:48

[RFC][PATCH v2 04/21] x86/numa_emulation: pass numa node type to fake nodes

2018-12-26 Thread Fengguang Wu
From: Fan Du Signed-off-by: Fan Du --- arch/x86/mm/numa_emulation.c | 14 ++ 1 file changed, 14 insertions(+) --- linux.orig/arch/x86/mm/numa_emulation.c 2018-12-23 19:21:11.002206144 +0800 +++ linux/arch/x86/mm/numa_emulation.c 2018-12-23 19:21:10.998206236 +0800 @@ -12,6

[RFC][PATCH v2 06/21] x86,numa: update numa node type

2018-12-26 Thread Fengguang Wu
From: Fan Du Signed-off-by: Fan Du Signed-off-by: Fengguang Wu --- arch/x86/mm/numa.c |1 + 1 file changed, 1 insertion(+) --- linux.orig/arch/x86/mm/numa.c 2018-12-23 19:38:17.363582512 +0800 +++ linux/arch/x86/mm/numa.c2018-12-23 19:38:17.363582512 +0800 @@ -594,6 +594,7

[RFC][PATCH v2 02/21] acpi/numa: memorize NUMA node type from SRAT table

2018-12-26 Thread Fengguang Wu
Du Signed-off-by: Fengguang Wu --- arch/x86/include/asm/numa.h |2 ++ arch/x86/mm/numa.c |2 ++ drivers/acpi/numa.c |5 + 3 files changed, 9 insertions(+) --- linux.orig/arch/x86/include/asm/numa.h 2018-12-23 19:20:39.890947888 +0800 +++ linux/arch/x86

[RFC][PATCH v2 00/21] PMEM NUMA node and hotness accounting/migration

2018-12-26 Thread Fengguang Wu
This is an attempt to use NVDIMM/PMEM as volatile NUMA memory that's transparent to normal applications and virtual machines. The code is still in active development. It's provided for early design review. Key functionalities: 1) create and describe PMEM NUMA node for NVDIMM memory 2) dumb

[RFC][PATCH v2 20/21] mm/vmscan.c: migrate anon DRAM pages to PMEM node

2018-12-26 Thread Fengguang Wu
refer to [1] for detailed backgroud, usecase, and benchmark result. [1] https://lore.kernel.org/patchwork/patch/622179/ Fengguang: - detect migrate thp and hugetlb - avoid moving pages to a non-existent node Signed-off-by: Fan Du Signed-off-by: Jingqi Liu Signed-off-by: Fengguang Wu --- mm/vm

[RFC][PATCH v2 19/21] mm/migrate.c: add move_pages(MPOL_MF_SW_YOUNG) flag

2018-12-26 Thread Fengguang Wu
trouble busy scanning LRU lists Signed-off-by: Liu Jingqi Signed-off-by: Fengguang Wu --- mm/migrate.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) --- linux.orig/mm/migrate.c 2018-12-23 20:37:12.604621319 +0800 +++ linux/mm/migrate.c 2018-12-23 20:37:12.604621319 +

[RFC][PATCH v2 13/21] x86/pgtable: dont check PMD accessed bit

2018-12-26 Thread Fengguang Wu
be worthwhile for - large idle area - sparsely populated area Signed-off-by: Jingqi Liu Signed-off-by: Fengguang Wu --- arch/x86/include/asm/pgtable.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux.orig/arch/x86/include/asm/pgtable.h 2018-12-23 19:50:50.917902600 +0800 +++ linux

[RFC][PATCH v2 10/21] mm: build separate zonelist for PMEM and DRAM node

2018-12-26 Thread Fengguang Wu
, we may create more kind of fallback zonelists and make them configurable by NUMA policy. Signed-off-by: Fan Du Signed-off-by: Fengguang Wu --- mm/mempolicy.c | 14 ++ mm/page_alloc.c | 42 +- 2 files changed, 43 insertions(+), 13

[RFC][PATCH v2 15/21] ept-idle: EPT walk for virtual machine

2018-12-26 Thread Fengguang Wu
hen either read_buffer_size is filled, or range_to_read is fully scanned. To make a more precise interface, we may need further switch to ioctl(). CC: Dave Hansen Signed-off-by: Peng Dong Signed-off-by: Liu Jingqi Signed-off-by: Fengguang Wu --- arch/x86/kvm/ept_idl

[RFC][PATCH v2 21/21] mm/vmscan.c: shrink anon list if can migrate to PMEM

2018-12-26 Thread Fengguang Wu
Fix OOM by making in-kernel DRAM=>PMEM migration reachable. Here we assume these 2 possible demotion paths: - DRAM migrate to PMEM - PMEM to swap device Signed-off-by: Fengguang Wu --- mm/vmscan.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- linux.orig/mm/vmsca

[RFC][PATCH v2 16/21] mm-idle: mm_walk for normal task

2018-12-26 Thread Fengguang Wu
From: Zhang Yi File pages are skipped for now. They are in general not guaranteed to be mapped. It means when become hot, there is no guarantee to find and move them to DRAM nodes. Signed-off-by: Zhang Yi Signed-off-by: Fengguang Wu --- arch/x86/kvm/ept_idle.c | 204

[RFC][PATCH v2 17/21] proc: introduce /proc/PID/idle_pages

2018-12-26 Thread Fengguang Wu
: Brendan Gregg Signed-off-by: Fengguang Wu --- fs/proc/base.c |2 + fs/proc/internal.h |1 fs/proc/task_mmu.c | 54 +++ 3 files changed, 57 insertions(+) --- linux.orig/fs/proc/base.c 2018-12-23 20:08:14.228919325 +0800 +++ linux/fs/proc/base.c

[RFC][PATCH v2 14/21] kvm: register in mm_struct

2018-12-26 Thread Fengguang Wu
VM is associated with an address space and not a specific thread. >From Documentation/virtual/kvm/api.txt: Only run VM ioctls from the same process (address space) that was used to create the VM. CC: Nikita Leshenko CC: Christian Borntraeger Signed-off-by: Fengguang Wu --- incl

Re: [PATCH 0/3] RISC-V: A few build/warning fixes and cleanup

2018-10-31 Thread Fengguang Wu
CC Philip, current kbuild test robot maintainer. On Wed, Oct 31, 2018 at 12:12:21PM -0600, Logan Gunthorpe wrote: On 2018-10-31 11:52 a.m., Olof Johansson wrote: I've migrated machines to a new system and that CI is up and running. Right now the emails don't go anywhere but me, but let me

Re: [PATCH 0/3] RISC-V: A few build/warning fixes and cleanup

2018-10-31 Thread Fengguang Wu
CC Philip, current kbuild test robot maintainer. On Wed, Oct 31, 2018 at 12:12:21PM -0600, Logan Gunthorpe wrote: On 2018-10-31 11:52 a.m., Olof Johansson wrote: I've migrated machines to a new system and that CI is up and running. Right now the emails don't go anywhere but me, but let me

Re: [PATCH] mm: simplify get_next_ra_size

2018-10-28 Thread Fengguang Wu
Looks good to me, thanks! Reviewed-by: Fengguang Wu On Sun, Oct 28, 2018 at 02:13:26PM +0800, Gao Xiang wrote: It's a trivial simplification for get_next_ra_size and clear enough for humans to understand. It also fixes potential overflow if ra->size(< ra_pages) is too large. Cc: Fen

Re: [PATCH] mm: simplify get_next_ra_size

2018-10-28 Thread Fengguang Wu
Looks good to me, thanks! Reviewed-by: Fengguang Wu On Sun, Oct 28, 2018 at 02:13:26PM +0800, Gao Xiang wrote: It's a trivial simplification for get_next_ra_size and clear enough for humans to understand. It also fixes potential overflow if ra->size(< ra_pages) is too large. Cc: Fen

Re: [PATCH v4.19-rc7] treewide: Replace more open-coded allocation size multiplications

2018-10-06 Thread Fengguang Wu
On Sat, Oct 06, 2018 at 08:51:16AM -0700, Kees Cook wrote: On Sat, Oct 6, 2018 at 1:49 AM, Fengguang Wu wrote: On Fri, Oct 05, 2018 at 08:14:34PM -0700, Joel Fernandes wrote: On Fri, Oct 05, 2018 at 05:22:35PM -0700, Greg KH wrote: And do we have a way to add a rule to 0-day to catch

Re: [PATCH v4.19-rc7] treewide: Replace more open-coded allocation size multiplications

2018-10-06 Thread Fengguang Wu
On Sat, Oct 06, 2018 at 08:51:16AM -0700, Kees Cook wrote: On Sat, Oct 6, 2018 at 1:49 AM, Fengguang Wu wrote: On Fri, Oct 05, 2018 at 08:14:34PM -0700, Joel Fernandes wrote: On Fri, Oct 05, 2018 at 05:22:35PM -0700, Greg KH wrote: And do we have a way to add a rule to 0-day to catch

Re: [PATCH v4.19-rc7] treewide: Replace more open-coded allocation size multiplications

2018-10-06 Thread Fengguang Wu
On Fri, Oct 05, 2018 at 08:14:34PM -0700, Joel Fernandes wrote: On Fri, Oct 05, 2018 at 05:22:35PM -0700, Greg KH wrote: On Fri, Oct 05, 2018 at 05:04:16PM -0700, Kees Cook wrote: > On Fri, Oct 5, 2018 at 4:51 PM, Greg KH wrote: > > On Fri, Oct 05, 2018 at 04:35:59PM -0700, Kees Cook wrote: >

Re: [PATCH v4.19-rc7] treewide: Replace more open-coded allocation size multiplications

2018-10-06 Thread Fengguang Wu
On Fri, Oct 05, 2018 at 08:14:34PM -0700, Joel Fernandes wrote: On Fri, Oct 05, 2018 at 05:22:35PM -0700, Greg KH wrote: On Fri, Oct 05, 2018 at 05:04:16PM -0700, Kees Cook wrote: > On Fri, Oct 5, 2018 at 4:51 PM, Greg KH wrote: > > On Fri, Oct 05, 2018 at 04:35:59PM -0700, Kees Cook wrote: >

[PATCH] mm: fix __get_user_pages_fast() comment

2018-09-27 Thread Fengguang Wu
mmu_gather_tlb no longer exist. Replace with mmu_table_batch. CC: triv...@kernel.org Signed-off-by: Fengguang Wu --- mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index fc5f98069f4e..69194043ddd4 100644 --- a/mm/gup.c +++ b/mm/gup.c

[PATCH] mm: fix __get_user_pages_fast() comment

2018-09-27 Thread Fengguang Wu
mmu_gather_tlb no longer exist. Replace with mmu_table_batch. CC: triv...@kernel.org Signed-off-by: Fengguang Wu --- mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index fc5f98069f4e..69194043ddd4 100644 --- a/mm/gup.c +++ b/mm/gup.c

[PATCH] mm: fix comment typo in inc_tlb_flush_pending()

2018-09-22 Thread Fengguang Wu
CC: triv...@kernel.org Signed-off-by: Fengguang Wu --- include/linux/mm_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 27c5446f3deb..d4f99f5f677c 100644 --- a/include/linux/mm_types.h +++ b/include/linux

[PATCH] mm: fix comment typo in inc_tlb_flush_pending()

2018-09-22 Thread Fengguang Wu
CC: triv...@kernel.org Signed-off-by: Fengguang Wu --- include/linux/mm_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 27c5446f3deb..d4f99f5f677c 100644 --- a/include/linux/mm_types.h +++ b/include/linux

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-04 Thread Fengguang Wu
On Tue, Sep 04, 2018 at 09:43:50AM +0200, Christian Borntraeger wrote: On 09/04/2018 09:15 AM, Fengguang Wu wrote: On Tue, Sep 04, 2018 at 08:37:03AM +0200, Nikita Leshenko wrote: On 4 Sep 2018, at 2:46, Fengguang Wu wrote: Here it goes: diff --git a/include/linux/mm_types.h b/include

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-04 Thread Fengguang Wu
On Tue, Sep 04, 2018 at 09:43:50AM +0200, Christian Borntraeger wrote: On 09/04/2018 09:15 AM, Fengguang Wu wrote: On Tue, Sep 04, 2018 at 08:37:03AM +0200, Nikita Leshenko wrote: On 4 Sep 2018, at 2:46, Fengguang Wu wrote: Here it goes: diff --git a/include/linux/mm_types.h b/include

Re: [RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-04 Thread Fengguang Wu
3/5] kvm-ept-idle: HVA indexed EPT read On 1 Sep 2018, at 13:28, Fengguang Wu wrote: +static ssize_t ept_idle_read(struct file *file, char *buf, +size_t count, loff_t *ppos) +{ + struct task_struct *task = file->private_data; + struct ept_idle_ctrl *

Re: [RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-04 Thread Fengguang Wu
3/5] kvm-ept-idle: HVA indexed EPT read On 1 Sep 2018, at 13:28, Fengguang Wu wrote: +static ssize_t ept_idle_read(struct file *file, char *buf, +size_t count, loff_t *ppos) +{ + struct task_struct *task = file->private_data; + struct ept_idle_ctrl *

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-04 Thread Fengguang Wu
On Tue, Sep 04, 2018 at 08:37:03AM +0200, Nikita Leshenko wrote: On 4 Sep 2018, at 2:46, Fengguang Wu wrote: Here it goes: diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 99ce070e7dcb..27c5446f3deb 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-04 Thread Fengguang Wu
On Tue, Sep 04, 2018 at 08:37:03AM +0200, Nikita Leshenko wrote: On 4 Sep 2018, at 2:46, Fengguang Wu wrote: Here it goes: diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 99ce070e7dcb..27c5446f3deb 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-03 Thread Fengguang Wu
On Tue, Sep 04, 2018 at 08:28:18AM +0800, Fengguang Wu wrote: Hi Christian and Nikita, On Mon, Sep 03, 2018 at 06:03:49PM +0200, Christian Borntraeger wrote: On 09/03/2018 04:10 PM, Nikita Leshenko wrote: On September 2, 2018 5:21:15 AM, fengguang...@intel.com wrote: diff --git a/virt/kvm

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-03 Thread Fengguang Wu
On Tue, Sep 04, 2018 at 08:28:18AM +0800, Fengguang Wu wrote: Hi Christian and Nikita, On Mon, Sep 03, 2018 at 06:03:49PM +0200, Christian Borntraeger wrote: On 09/03/2018 04:10 PM, Nikita Leshenko wrote: On September 2, 2018 5:21:15 AM, fengguang...@intel.com wrote: diff --git a/virt/kvm

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-03 Thread Fengguang Wu
Hi Christian and Nikita, On Mon, Sep 03, 2018 at 06:03:49PM +0200, Christian Borntraeger wrote: On 09/03/2018 04:10 PM, Nikita Leshenko wrote: On September 2, 2018 5:21:15 AM, fengguang...@intel.com wrote: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index

Re: [RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-03 Thread Fengguang Wu
Hi Christian and Nikita, On Mon, Sep 03, 2018 at 06:03:49PM +0200, Christian Borntraeger wrote: On 09/03/2018 04:10 PM, Nikita Leshenko wrote: On September 2, 2018 5:21:15 AM, fengguang...@intel.com wrote: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index

Re: [RFC][PATCH 0/5] introduce /proc/PID/idle_bitmap

2018-09-02 Thread Fengguang Wu
Here are the diffstat: arch/x86/kvm/Kconfig| 11 + arch/x86/kvm/Makefile |4 arch/x86/kvm/ept_idle.c | 329 ++ arch/x86/kvm/ept_idle.h | 79 + fs/proc/base.c |2 fs/proc/internal.h |1 fs/proc/task_mmu.c | 63

Re: [RFC][PATCH 0/5] introduce /proc/PID/idle_bitmap

2018-09-02 Thread Fengguang Wu
Here are the diffstat: arch/x86/kvm/Kconfig| 11 + arch/x86/kvm/Makefile |4 arch/x86/kvm/ept_idle.c | 329 ++ arch/x86/kvm/ept_idle.h | 79 + fs/proc/base.c |2 fs/proc/internal.h |1 fs/proc/task_mmu.c | 63

[RFC][PATCH 2/5] [PATCH 2/5] proc: introduce /proc/PID/idle_bitmap

2018-09-01 Thread Fengguang Wu
: Brendan Gregg Signed-off-by: Fengguang Wu --- fs/proc/base.c | 2 ++ fs/proc/internal.h | 1 + fs/proc/task_mmu.c | 63 ++ 3 files changed, 66 insertions(+) diff --git a/fs/proc/base.c b/fs/proc/base.c index aaffc0c30216..d81322b5b8d2 100644

[RFC][PATCH 2/5] [PATCH 2/5] proc: introduce /proc/PID/idle_bitmap

2018-09-01 Thread Fengguang Wu
: Brendan Gregg Signed-off-by: Fengguang Wu --- fs/proc/base.c | 2 ++ fs/proc/internal.h | 1 + fs/proc/task_mmu.c | 63 ++ 3 files changed, 66 insertions(+) diff --git a/fs/proc/base.c b/fs/proc/base.c index aaffc0c30216..d81322b5b8d2 100644

[RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-01 Thread Fengguang Wu
able walks. In this manner, we provide uniform interface for both virtual machines and normal processes. The use scenario would be per task/VM working set tracking and migration. Very convenient for applying task/vma and VM granularity policies. Signed-off-by: Peng DongX Signed-off-by: Fengguang Wu ---

[RFC][PATCH 5/5] [PATCH 5/5] kvm-ept-idle: enable module

2018-09-01 Thread Fengguang Wu
Signed-off-by: Fengguang Wu --- arch/x86/kvm/Kconfig | 11 +++ arch/x86/kvm/Makefile | 4 2 files changed, 15 insertions(+) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 1bbec387d289..4c6dec47fac6 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig

[RFC][PATCH 0/5] introduce /proc/PID/idle_bitmap

2018-09-01 Thread Fengguang Wu
This new /proc/PID/idle_bitmap interface aims to complement the current global /sys/kernel/mm/page_idle/bitmap. To enable efficient user space driven migrations. The pros and cons will be discussed in changelog of "[PATCH] proc: introduce /proc/PID/idle_bitmap". The driving force is to improve

[RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-01 Thread Fengguang Wu
be wasteful for the majority normal tasks. The alternative is to add a flag only, and let it find the corresponding VM in kvm vm_list. Signed-off-by: Fengguang Wu --- include/linux/sched.h | 10 ++ virt/kvm/kvm_main.c | 1 + 2 files changed, 11 insertions(+) diff --git a/include/linux/sched.h

[RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-01 Thread Fengguang Wu
able walks. In this manner, we provide uniform interface for both virtual machines and normal processes. The use scenario would be per task/VM working set tracking and migration. Very convenient for applying task/vma and VM granularity policies. Signed-off-by: Peng DongX Signed-off-by: Fengguang Wu ---

[RFC][PATCH 5/5] [PATCH 5/5] kvm-ept-idle: enable module

2018-09-01 Thread Fengguang Wu
Signed-off-by: Fengguang Wu --- arch/x86/kvm/Kconfig | 11 +++ arch/x86/kvm/Makefile | 4 2 files changed, 15 insertions(+) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 1bbec387d289..4c6dec47fac6 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig

[RFC][PATCH 0/5] introduce /proc/PID/idle_bitmap

2018-09-01 Thread Fengguang Wu
This new /proc/PID/idle_bitmap interface aims to complement the current global /sys/kernel/mm/page_idle/bitmap. To enable efficient user space driven migrations. The pros and cons will be discussed in changelog of "[PATCH] proc: introduce /proc/PID/idle_bitmap". The driving force is to improve

[RFC][PATCH 1/5] [PATCH 1/5] kvm: register in task_struct

2018-09-01 Thread Fengguang Wu
be wasteful for the majority normal tasks. The alternative is to add a flag only, and let it find the corresponding VM in kvm vm_list. Signed-off-by: Fengguang Wu --- include/linux/sched.h | 10 ++ virt/kvm/kvm_main.c | 1 + 2 files changed, 11 insertions(+) diff --git a/include/linux/sched.h

[RFC][PATCH 4/5] [PATCH 4/5] kvm-ept-idle: EPT page table walk for A bits

2018-09-01 Thread Fengguang Wu
on read return value. If that's really a concern, we may use ioctl() instead.. CC: Dave Hansen Signed-off-by: Fengguang Wu --- arch/x86/kvm/ept_idle.c | 211 arch/x86/kvm/ept_idle.h | 55 + 2 files changed, 266 insertions(+) diff --git

[RFC][PATCH 4/5] [PATCH 4/5] kvm-ept-idle: EPT page table walk for A bits

2018-09-01 Thread Fengguang Wu
on read return value. If that's really a concern, we may use ioctl() instead.. CC: Dave Hansen Signed-off-by: Fengguang Wu --- arch/x86/kvm/ept_idle.c | 211 arch/x86/kvm/ept_idle.h | 55 + 2 files changed, 266 insertions(+) diff --git

Re: [PATCH] printk: inject caller information into the body of message

2018-06-20 Thread Fengguang Wu
On Wed, Jun 20, 2018 at 02:45:25PM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 2:41 PM, Fengguang Wu wrote: On Wed, Jun 20, 2018 at 02:31:51PM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 1:37 PM, Fengguang Wu wrote: On Wed, Jun 20, 2018 at 11:30:05AM +0200, Dmitry Vyukov

Re: [PATCH] printk: inject caller information into the body of message

2018-06-20 Thread Fengguang Wu
On Wed, Jun 20, 2018 at 02:45:25PM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 2:41 PM, Fengguang Wu wrote: On Wed, Jun 20, 2018 at 02:31:51PM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 1:37 PM, Fengguang Wu wrote: On Wed, Jun 20, 2018 at 11:30:05AM +0200, Dmitry Vyukov

Re: [PATCH] printk: inject caller information into the body of message

2018-06-20 Thread Fengguang Wu
On Wed, Jun 20, 2018 at 02:31:51PM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 1:37 PM, Fengguang Wu wrote: On Wed, Jun 20, 2018 at 11:30:05AM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 11:06 AM, Sergey Senozhatsky wrote: Hi Dmitry, On (06/20/18 10:45), Dmitry Vyukov

Re: [PATCH] printk: inject caller information into the body of message

2018-06-20 Thread Fengguang Wu
On Wed, Jun 20, 2018 at 02:31:51PM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 1:37 PM, Fengguang Wu wrote: On Wed, Jun 20, 2018 at 11:30:05AM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 11:06 AM, Sergey Senozhatsky wrote: Hi Dmitry, On (06/20/18 10:45), Dmitry Vyukov

Re: [PATCH] printk: inject caller information into the body of message

2018-06-20 Thread Fengguang Wu
On Wed, Jun 20, 2018 at 11:30:05AM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 11:06 AM, Sergey Senozhatsky wrote: Hi Dmitry, On (06/20/18 10:45), Dmitry Vyukov wrote: Hi Sergey, What are the visible differences between this patch and Tetsuo's patch? I guess none, and looking at

Re: [PATCH] printk: inject caller information into the body of message

2018-06-20 Thread Fengguang Wu
On Wed, Jun 20, 2018 at 11:30:05AM +0200, Dmitry Vyukov wrote: On Wed, Jun 20, 2018 at 11:06 AM, Sergey Senozhatsky wrote: Hi Dmitry, On (06/20/18 10:45), Dmitry Vyukov wrote: Hi Sergey, What are the visible differences between this patch and Tetsuo's patch? I guess none, and looking at

Re: [Ksummit-discuss] bug-introducing patches

2018-05-14 Thread Fengguang Wu
On Mon, May 14, 2018 at 10:48:03AM +0200, Boris Brezillon wrote: +Fengguang On Mon, 14 May 2018 10:40:10 +0200 Geert Uytterhoeven wrote: Hi Boris, On Mon, May 14, 2018 at 10:34 AM, Boris Brezillon wrote: > On Mon, 14 May 2018 10:29:04

Re: [Ksummit-discuss] bug-introducing patches

2018-05-14 Thread Fengguang Wu
On Mon, May 14, 2018 at 10:48:03AM +0200, Boris Brezillon wrote: +Fengguang On Mon, 14 May 2018 10:40:10 +0200 Geert Uytterhoeven wrote: Hi Boris, On Mon, May 14, 2018 at 10:34 AM, Boris Brezillon wrote: > On Mon, 14 May 2018 10:29:04 +0200 > Geert Uytterhoeven wrote: >> On Mon, May 14,

Re: cross-compiling a 64-bit kernel on a 32-bit host

2018-05-10 Thread Fengguang Wu
Hi Josh, CC LKP team. On Thu, May 10, 2018 at 05:36:19PM -0500, Josh Poimboeuf wrote: Hi Fengguang, I occasionally get compilation bug reports from people who are cross-compiling an x86-64 kernel target on an x86-32 host. Any chance the 0-day build bot could test that configuration? I think

Re: cross-compiling a 64-bit kernel on a 32-bit host

2018-05-10 Thread Fengguang Wu
Hi Josh, CC LKP team. On Thu, May 10, 2018 at 05:36:19PM -0500, Josh Poimboeuf wrote: Hi Fengguang, I occasionally get compilation bug reports from people who are cross-compiling an x86-64 kernel target on an x86-32 host. Any chance the 0-day build bot could test that configuration? I think

Re: [v2] mm: access to uninitialized struct page

2018-05-04 Thread Fengguang Wu
Hi Pavel, FYI here is 0day's bisect result. The attached dmesg has reproduce script at the bottom. [27e2ce5dba4c30db031744c8140675d03d2ae7aa] mm: access to uninitialized struct page git://git.cmpxchg.org/linux-mmotm.git devel-catchup-201805041701 git bisect start

Re: [v2] mm: access to uninitialized struct page

2018-05-04 Thread Fengguang Wu
Hi Pavel, FYI here is 0day's bisect result. The attached dmesg has reproduce script at the bottom. [27e2ce5dba4c30db031744c8140675d03d2ae7aa] mm: access to uninitialized struct page git://git.cmpxchg.org/linux-mmotm.git devel-catchup-201805041701 git bisect start

[async_page_fault] PANIC: double fault, error_code: 0x0

2018-05-02 Thread Fengguang Wu
Hello, FYI this happens in mainline kernel 4.17.0-rc3. It at least dates back to v4.16 . It occurs in 2 out of 2 boots. It happens only with CONFIG_IA32_EMULATION enabled. [0.001000] Good, all 261 testcases passed! | [0.001000] - [0.001000] ACPI: Core

[async_page_fault] PANIC: double fault, error_code: 0x0

2018-05-02 Thread Fengguang Wu
Hello, FYI this happens in mainline kernel 4.17.0-rc3. It at least dates back to v4.16 . It occurs in 2 out of 2 boots. It happens only with CONFIG_IA32_EMULATION enabled. [0.001000] Good, all 261 testcases passed! | [0.001000] - [0.001000] ACPI: Core

Re: [per_cpu_ptr_to_phys] PANIC: early exception 0x0d IP 10:ffffffffa892f15f error 0 cr2 0xffff88001fbff000

2018-05-02 Thread Fengguang Wu
Hi all, On Wed, Apr 18, 2018 at 06:38:25PM -0500, Dennis Zhou wrote: Hi, On Wed, Apr 18, 2018 at 09:55:53PM +0800, Fengguang Wu wrote: Hello, FYI here is a slightly different boot error in mainline kernel 4.17.0-rc1. It also dates back to v4.16 . Now I find 2 more occurrances in v4.15

Re: [per_cpu_ptr_to_phys] PANIC: early exception 0x0d IP 10:ffffffffa892f15f error 0 cr2 0xffff88001fbff000

2018-05-02 Thread Fengguang Wu
Hi all, On Wed, Apr 18, 2018 at 06:38:25PM -0500, Dennis Zhou wrote: Hi, On Wed, Apr 18, 2018 at 09:55:53PM +0800, Fengguang Wu wrote: Hello, FYI here is a slightly different boot error in mainline kernel 4.17.0-rc1. It also dates back to v4.16 . Now I find 2 more occurrances in v4.15

Re: [crng_reseed] WARNING: inconsistent lock state

2018-04-29 Thread Fengguang Wu
On Sun, Apr 29, 2018 at 03:07:06AM +, Linus Torvalds wrote: On Sat, Apr 28, 2018 at 7:26 PM Fengguang Wu <fengguang...@intel.com> wrote: FYI this happens in mainline kernel 4.17.0-rc2. It looks like a new regression. It occurs in 3 out of 3 boots. There is another "[ 294.

Re: [crng_reseed] WARNING: inconsistent lock state

2018-04-29 Thread Fengguang Wu
On Sun, Apr 29, 2018 at 03:07:06AM +, Linus Torvalds wrote: On Sat, Apr 28, 2018 at 7:26 PM Fengguang Wu wrote: FYI this happens in mainline kernel 4.17.0-rc2. It looks like a new regression. It occurs in 3 out of 3 boots. There is another "[ 294.642506] BUG: sleeping fun

Re: [llc_ui_release] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004

2018-04-29 Thread Fengguang Wu
On Sun, Apr 29, 2018 at 03:30:48AM +, Linus Torvalds wrote: On Sat, Apr 28, 2018 at 7:12 PM Fengguang Wu <fengguang...@intel.com> wrote: FYI this happens in mainline kernel 4.17.0-rc2. It looks like a new regression. It occurs in 5 out of 5 boots. [main] 375 sockets created

Re: [llc_ui_release] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004

2018-04-29 Thread Fengguang Wu
On Sun, Apr 29, 2018 at 03:30:48AM +, Linus Torvalds wrote: On Sat, Apr 28, 2018 at 7:12 PM Fengguang Wu wrote: FYI this happens in mainline kernel 4.17.0-rc2. It looks like a new regression. It occurs in 5 out of 5 boots. [main] 375 sockets created based on info from socket

Re: ed74ae0342 ("blk-mq: Avoid that a completion can be ignored .."): BUG: kernel hang in test stage

2018-04-28 Thread Fengguang Wu
TIMER Any chance you can try with the newer version? https://github.com/bvanassche/linux/commit/4acd555fa13087 That works! Tested-by: Fengguang Wu <fengguang...@intel.com>

Re: ed74ae0342 ("blk-mq: Avoid that a completion can be ignored .."): BUG: kernel hang in test stage

2018-04-28 Thread Fengguang Wu
? https://github.com/bvanassche/linux/commit/4acd555fa13087 That works! Tested-by: Fengguang Wu

  1   2   3   4   5   6   7   8   9   10   >