Re: [PATCH v3] m68k: Fix memblock-related crashes

2018-12-08 Thread Mike Rapoport
On Sat, Dec 08, 2018 at 11:51:38AM +0100, Geert Uytterhoeven wrote: > Hi Mike, > > On Fri, Dec 7, 2018 at 10:02 PM Mike Rapoport wrote: > > On Fri, Dec 07, 2018 at 05:50:11PM +0100, Geert Uytterhoeven wrote: > > > Sun-3 must be broken before this fix, as i

Re: [PATCH v3] m68k: Fix memblock-related crashes

2018-12-07 Thread Mike Rapoport
On Fri, Dec 07, 2018 at 05:50:11PM +0100, Geert Uytterhoeven wrote: > When running the kernel in Fast RAM on Atari: > > Ignoring memory chunk at 0x0:0xe0 before the first chunk > ... > Unable to handle kernel NULL pointer dereference at virtual address > (ptrval) > Oops:

Re: [PATCH 1/1] userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered

2018-12-06 Thread Mike Rapoport
tive warning. > > Cc: > Fixes: 29ec90660d68 ("userfaultfd: shmem/hugetlbfs: only allow to register > VM_MAYWRITE vmas") > Reported-by: syzbot+06c7092e7d71218a2...@syzkaller.appspotmail.com > Signed-off-by: Andrea Arcangeli Acked-by: Mike Rapoport > --- >

Re: [PATCH v2 1/6] powerpc: prefer memblock APIs returning virtual address

2018-12-05 Thread Mike Rapoport
On Wed, Dec 05, 2018 at 11:37:44PM +1100, Michael Ellerman wrote: > Mike Rapoport writes: > > On Tue, Dec 04, 2018 at 08:59:41PM +1100, Michael Ellerman wrote: > >> Hi Mike, > >> > >> Thanks for trying to clean these up. > >> > >> I th

Re: [RFC PATCH 02/14] mm/hms: heterogenenous memory system (HMS) documentation

2018-12-05 Thread Mike Rapoport
On Mon, Dec 03, 2018 at 06:34:57PM -0500, jgli...@redhat.com wrote: > From: Jérôme Glisse > > Add documentation to what is HMS and what it is for (see patch content). > > Signed-off-by: Jérôme Glisse > Cc: Rafael J. Wysocki > Cc: Ross Zwisler > Cc: Dan Williams > Cc: Dave Hansen > Cc:

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-03 Thread Mike Rapoport
Hi John, Thanks for having documentation as a part of the patch. Some kernel-doc nits below. On Mon, Dec 03, 2018 at 04:17:19PM -0800, john.hubb...@gmail.com wrote: > From: John Hubbard > > Introduces put_user_page(), which simply calls put_page(). > This provides a way to update all

Re: [PATCH v2] memblock: Anonotate memblock_is_reserved() with __init_memblock.

2018-12-03 Thread Mike Rapoport
of memblock_is_reserved is wrong. > > Use __init_memblock instead of __init. > > Signed-off-by: liyueyi Acked-by: Mike Rapoport > --- > > Changes v2: correct typo in 'warning'. > > mm/memblock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH v2 1/9] mm: Introduce new vm_insert_range API

2018-12-02 Thread Mike Rapoport
On Mon, Dec 03, 2018 at 09:51:45AM +0530, Souptick Joarder wrote: > Hi Mike, > > On Sun, Dec 2, 2018 at 4:43 PM Mike Rapoport wrote: > > > > On Sun, Dec 02, 2018 at 11:49:44AM +0530, Souptick Joarder wrote: > > > Previouly drivers have their own way of mapping rang

Re: [PATCH v4 7/7] cgroup: document cgroup v2 freezer interface

2018-12-02 Thread Mike Rapoport
On Fri, Nov 30, 2018 at 03:47:45PM -0800, Roman Gushchin wrote: > Describe cgroup v2 freezer interface in the cgroup v2 admin guide. > > Signed-off-by: Roman Gushchin > Cc: Tejun Heo > Cc: linux-...@vger.kernel.org > Cc: kernel-t...@fb.com Reviewed-by: Mike Rapoport >

Re: [PATCH v2] mm/memblock: skip kmemleak for kasan_init()

2018-11-29 Thread Mike Rapoport
addr != end) > [3] while (pudp++, addr = next, addr != end && pud_none(READ_ONCE(*pudp))) > [4] while (pmdp++, addr = next, addr != end && pmd_none(READ_ONCE(*pmdp))) > [5] while (ptep++, addr = next, addr != end && pte_none(READ_ONCE(*ptep))) >

Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-27 Thread Mike Rapoport
On November 27, 2018 11:08:50 PM GMT+02:00, Hugh Dickins wrote: >On Tue, 27 Nov 2018, Mike Rapoport wrote: >> On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote: >> > >> > +/* >> > + * A choice of three behaviors for wait_on_page_bit_com

Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-27 Thread Mike Rapoport
On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote: > Waiting on a page migration entry has used wait_on_page_locked() all > along since 2006: but you cannot safely wait_on_page_locked() without > holding a reference to the page, and that extra reference is enough to > make

Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated

2018-11-27 Thread Mike Rapoport
On Mon, Nov 26, 2018 at 12:53:51PM -0800, Matthew Wilcox wrote: > On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote: > > Waiting on a page migration entry has used wait_on_page_locked() all > > along since 2006: but you cannot safely wait_on_page_locked() without > > holding a reference

Re: [PATCH 4/5] userfaultfd: shmem: add i_size checks

2018-11-27 Thread Mike Rapoport
ATE: check the i_size after the PT lock before mapping anonymous memory or zeropages into the MAP_PRIVATE shmem mapping. A mostly irrelevant cleanup: like we do the delete_from_page_cache() pagecache removal after dropping the PT lock, the PT lock is a spinlock so drop it before the sleepable page

[PATCH 4/5] openrisc: simplify pte_alloc_one_kernel()

2018-11-25 Thread Mike Rapoport
the allocated page is cleared using clear_page(). The code is simplified by replacing __get_free_page() with get_zeroed_page() and by replacing memblock_phys_alloc() with memblock_alloc(). Signed-off-by: Mike Rapoport --- arch/openrisc/mm/ioremap.c | 11 --- 1 file changed, 4 insertions

Re: [RFC PATCH 1/3] mm, proc: be more verbose about unstable VMA flags in /proc//smaps

2018-11-21 Thread Mike Rapoport
gt; Can we start to claw some of this back? Perhaps with a config option > > to hide the flags to put applications on notice? > > I would love to. My knowledge of CRIU is very minimal, but my > understanding is that this is the primary consumer of those flags. And > checkpointing

Re: [RFC PATCH 1/3] mm, proc: be more verbose about unstable VMA flags in /proc//smaps

2018-11-21 Thread Mike Rapoport
On Tue, Nov 20, 2018 at 11:35:13AM +0100, Michal Hocko wrote: > From: Michal Hocko > > Even though vma flags exported via /proc//smaps are explicitly > documented to be not guaranteed for future compatibility the warning > doesn't go far enough because it doesn't mention semantic changes to >

Re: [PATCH] userfaultfd: convert userfaultfd_ctx::refcount to refcount_t

2018-11-21 Thread Mike Rapoport
wed; with CONFIG_REFCOUNT_FULL, > refcount_inc() already checks for it and warns. > > Signed-off-by: Eric Biggers Reviewed-by: Mike Rapoport > --- > fs/userfaultfd.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/fs/userfaultfd.c b/fs/use

Re: [PATCH 5/7] doc/vm: New documentation for memory cache

2018-11-20 Thread Mike Rapoport
On Wed, Nov 14, 2018 at 03:49:18PM -0700, Keith Busch wrote: > Platforms may provide system memory that contains side caches to help > spped up access. These memory caches are part of a memory node and > the cache attributes are exported by the kernel. > > Add new documentation providing a brief

Re: [PATCH 3/7] doc/vm: New documentation for memory performance

2018-11-20 Thread Mike Rapoport
Hi, Sorry if I'm jumping too late. On Wed, Nov 14, 2018 at 03:49:16PM -0700, Keith Busch wrote: > Platforms may provide system memory where some physical address ranges > perform differently than others. These heterogeneous memory attributes are > common to the node that provides the memory and

Re: [PATCH 1/9] mm: Introduce new vm_insert_range API

2018-11-19 Thread Mike Rapoport
On Mon, Nov 19, 2018 at 08:43:09PM +0530, Souptick Joarder wrote: > Hi Mike, > > On Sat, Nov 17, 2018 at 8:07 PM Matthew Wilcox wrote: > > > > On Sat, Nov 17, 2018 at 12:26:38PM +0530, Souptick Joarder wrote: > > > On Fri, Nov 16, 2018 at

Re: [PATCH v3] mm: Create the new vm_fault_t type

2018-11-14 Thread Mike Rapoport
HINDEX and VM_FAULT_GET_HINDEX values are changed > to avoid conflict with other VM_FAULT codes. > > Signed-off-by: Souptick Joarder For the docs part Reviewed-by: Mike Rapoport > --- > v2: Updated the change log and corrected the document part. > name added to the enum that

Re: [PATCH v2] fork: Fix some -Wmissing-prototypes warnings

2018-11-14 Thread Mike Rapoport
r ‘fork_init’ > [-Wmissing-prototypes] > > Add the missing declaration in head file to fix this. > > Also, remove arch_release_thread_stack() completely because no > arch seems to implement it since bb9d81264 (arch: remove tile port). > > Signed-off-by: Yi Wang Acked-by

Re: [PATCH v2 2/6] mm: introduce put_user_page*(), placeholder versions

2018-11-11 Thread Mike Rapoport
Hi, On Sat, Nov 10, 2018 at 12:50:37AM -0800, john.hubb...@gmail.com wrote: > From: John Hubbard > > Introduces put_user_page(), which simply calls put_page(). > This provides a way to update all get_user_pages*() callers, > so that they call put_user_page(), instead of put_page(). > > Also

Re: [[PATCH]] mips: Fix switch to NO_BOOTMEM for SGI-IP27/loongons3 NUMA

2018-11-09 Thread Mike Rapoport
des in KSeg0 if possible. > @@ -2307,6 +2305,7 @@ void __init trap_init(void) > if (board_ebase_setup) > board_ebase_setup(); > per_cpu_trap_init(true); > + memblock_set_bottom_up(false); > > /* > * Copy the generic exception handlers to their fi

Re: [[PATCH]] mips: Fix switch to NO_BOOTMEM for SGI-IP27/loongons3 NUMA

2018-11-08 Thread Mike Rapoport
On November 8, 2018 6:52:17 PM GMT+02:00, Thomas Bogendoerfer wrote: >On Thu, 8 Nov 2018 18:18:23 +0200 >Mike Rapoport wrote: > >> On Thu, Nov 08, 2018 at 03:44:28PM +0100, Thomas Bogendoerfer wrote: >> > Commit bcec54bf3118 ("mips: switch to NO_BOOTMEM") br

Re: [[PATCH]] mips: Fix switch to NO_BOOTMEM for SGI-IP27/loongons3 NUMA

2018-11-08 Thread Mike Rapoport
On Thu, Nov 08, 2018 at 03:44:28PM +0100, Thomas Bogendoerfer wrote: > Commit bcec54bf3118 ("mips: switch to NO_BOOTMEM") broke SGI-IP27 > and NUMA enabled loongson3 by doing memblock_set_current_limit() > before max_low_pfn has been evaluated. Both platforms need to do the >

Re: [PATCH v2] mm: Create the new vm_fault_t type

2018-11-06 Thread Mike Rapoport
On Tue, Nov 06, 2018 at 02:04:54PM +0530, Souptick Joarder wrote: > On Tue, Nov 6, 2018 at 1:56 PM Mike Rapoport wrote: > > > > On Tue, Nov 06, 2018 at 01:19:34PM +0530, Souptick Joarder wrote: > > > Page fault handlers are supposed to return VM_FAULT codes, > > &

Re: [PATCH v2] mm: Create the new vm_fault_t type

2018-11-06 Thread Mike Rapoport
On Tue, Nov 06, 2018 at 01:19:34PM +0530, Souptick Joarder wrote: > Page fault handlers are supposed to return VM_FAULT codes, > but some drivers/file systems mistakenly return error > numbers. Now that all drivers/file systems have been converted > to use the vm_fault_t return type, change the

Re: [PATCH] mm: Create the new vm_fault_t type

2018-11-05 Thread Mike Rapoport
On Mon, Nov 05, 2018 at 07:23:55PM +0530, Souptick Joarder wrote: > On Mon, Nov 5, 2018 at 2:43 PM Mike Rapoport wrote: > > > > On Mon, Nov 05, 2018 at 11:14:17AM +0530, Souptick Joarder wrote: > > > Hi Matthew, > > > > > > On Sun, N

Re: [PATCH] mm: Create the new vm_fault_t type

2018-11-05 Thread Mike Rapoport
On Mon, Nov 05, 2018 at 11:14:17AM +0530, Souptick Joarder wrote: > Hi Matthew, > > On Sun, Nov 4, 2018 at 2:06 PM Mike Rapoport wrote: > > > > On Sat, Nov 03, 2018 at 05:02:36AM -0700, Matthew Wilcox wrote: > > > On Sat, Nov 03, 2018 at 10:35:04AM +0530, Soupti

Re: [PATCH] mm: Create the new vm_fault_t type

2018-11-04 Thread Mike Rapoport
On Sat, Nov 03, 2018 at 05:02:36AM -0700, Matthew Wilcox wrote: > On Sat, Nov 03, 2018 at 10:35:04AM +0530, Souptick Joarder wrote: > > Page fault handlers are supposed to return VM_FAULT codes, > > but some drivers/file systems mistakenly return error > > numbers. Now that all drivers/file

Re: Will the recent memory leak fixes be backported to longterm kernels?

2018-11-04 Thread Mike Rapoport
On Fri, Nov 02, 2018 at 12:01:22PM -0400, Sasha Levin wrote: > On Fri, Nov 02, 2018 at 02:45:42AM +, Dexuan Cui wrote: > >>From: Roman Gushchin > >>Sent: Thursday, November 1, 2018 17:58 > >> > >>On Fri, Nov 02, 2018 at 12:16:02AM +, Dexuan Cui wrote: > >>Hello, Dexuan! > >> > >>A couple

Re: [mm PATCH v4 3/6] mm: Use memblock/zone specific iterator for handling deferred page init

2018-11-01 Thread Mike Rapoport
On Wed, Oct 31, 2018 at 03:40:02PM +, Pasha Tatashin wrote: > > > On 10/17/18 7:54 PM, Alexander Duyck wrote: > > This patch introduces a new iterator for_each_free_mem_pfn_range_in_zone. > > > > This iterator will take care of making sure a given memory range provided > > is in fact

Re: [LKP] [mm] 68c37ccedc: BUG:kernel_hang_in_early-boot_stage,last_printk:early_console_in_setup_code

2018-10-30 Thread Mike Rapoport
On Mon, Oct 29, 2018 at 03:47:11PM -0700, Andrew Morton wrote: > On Mon, 29 Oct 2018 21:15:01 +0800 kernel test robot > wrote: > > > FYI, we noticed the following commit (built with gcc-7): > > > > commit: 68c37ccedcde10514898f4ba3b28c0de85c590d1 ("mm: nobootmem: remove > > bootmem allocation

Re: [PATCH v4 1/2] arm64: Get rid of __early_init_dt_declare_initrd()

2018-10-27 Thread Mike Rapoport
018 12:04:58 +0300 Subject: [PATCH] arm64: Get rid of __early_init_dt_declare_initrd() ARM64 is the only architecture that re-defines __early_init_dt_declare_initrd() in order for that function to populate initrd_start/initrd_end with physical addresses instead of virtual addresses. Instead of having an

Re: [PATCH] memblock: remove stale #else and the code it protects

2018-10-21 Thread Mike Rapoport
On October 19, 2018 11:17:30 AM GMT+03:00, Wei Yang wrote: >Which tree it applies? To mmotm of the end of September. >On Thu, Sep 27, 2018 at 08:03:45PM +0300, Mike Rapoport wrote: >>During removal of HAVE_MEMBLOCK definition, the #else clause of the >> >> #if

Re: [mm PATCH v3 3/6] mm: Use memblock/zone specific iterator for handling deferred page init

2018-10-17 Thread Mike Rapoport
On Mon, Oct 15, 2018 at 01:27:09PM -0700, Alexander Duyck wrote: > This patch introduces a new iterator for_each_free_mem_pfn_range_in_zone. > > This iterator will take care of making sure a given memory range provided > is in fact contained within a zone. It takes are of all the bounds checking

Re: [mm PATCH v3 1/6] mm: Use mm_zero_struct_page from SPARC on all 64b architectures

2018-10-17 Thread Mike Rapoport
On Tue, Oct 16, 2018 at 03:01:11PM -0400, Pavel Tatashin wrote: > > > On 10/15/18 4:26 PM, Alexander Duyck wrote: > > This change makes it so that we use the same approach that was already in > > use on Sparc on all the archtectures that support a 64b long. > > > > This is mostly motivated by

Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES

2018-10-11 Thread Mike Rapoport
On Fri, Oct 05, 2018 at 03:19:34PM -0700, Andrew Morton wrote: > On Fri, 5 Oct 2018 00:07:04 +0300 Mike Rapoport > wrote: > > > When a memblock allocation APIs are called with align = 0, the alignment is > > implicitly set to SMP_CACHE_BYTES. > > > > Repla

[PATCH 0/2] docs: memory-hotplug: add details about locking internals

2018-10-10 Thread Mike Rapoport
internals Mike Rapoport (1): docs/core-api: rename memory-hotplug-notifier to memory-hotplug Documentation/core-api/index.rst | 2 +- Documentation/core-api/memory-hotplug-notifier.rst | 84 -- Documentation/core-api/memory-hotplug.rst | 125

[PATCH 1/2] docs/core-api: rename memory-hotplug-notifier to memory-hotplug

2018-10-10 Thread Mike Rapoport
From: Mike Rapoport to allow additions of new documentation about memory hotplug under the same roof. Signed-off-by: Mike Rapoport --- Documentation/core-api/index.rst | 2 +- Documentation/core-api/memory-hotplug-notifier.rst | 84 - Documentation/core

[PATCH 2/2] docs/core-api: memory-hotplug: add some details about locking internals

2018-10-10 Thread Mike Rapoport
Mackerras Cc: Philippe Ombredanne Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: YASUAKI ISHIMATSU Signed-off-by: Andrew Morton Signed-off-by: Mike Rapoport --- Documentation/core-api/mem

Re: linux-next: manual merge of the akpm tree with the jc_docs tree

2018-10-08 Thread Mike Rapoport
On Mon, Oct 08, 2018 at 06:38:40PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the akpm tree got conflicts in: > > Documentation/memory-hotplug.txt > Documentation/admin-guide/mm/memory-hotplug.rst > > between commits: > > 6bf53999a3a2 ("docs: move memory

[PATCH] percpu: stop leaking bitmap metadata blocks

2018-10-07 Thread Mike Rapoport
The commit ca460b3c9627 ("percpu: introduce bitmap metadata blocks") introduced bitmap metadata blocks. These metadata blocks are allocated whenever a new chunk is created, but they are never freed. Fix it. Fixes: ca460b3c9627 ("percpu: introduce bitmap metadata blocks")

Re: [RFC PATCH] mm, proc: report PR_SET_THP_DISABLE in proc

2018-10-03 Thread Mike Rapoport
On Tue, Oct 02, 2018 at 01:29:42PM -0700, David Rientjes wrote: > On Tue, 2 Oct 2018, Michal Hocko wrote: > > > On Wed 26-09-18 08:06:24, Michal Hocko wrote: > > > On Tue 25-09-18 15:04:06, Andrew Morton wrote: > > > > On Tue, 25 Sep 2018 14:45:19 -0700 (PDT) David Rientjes > > > > wrote: > > >

Re: [PATCH v2 2/3] userfaultfd: selftest: generalize read and poll

2018-09-30 Thread Mike Rapoport
ous mismatch of behaviors between the two modes on that the old > code: > > - did not check EAGAIN case in read() mode > - ignored BOUNCE_VERIFY check in read() mode > > Signed-off-by: Peter Xu Acked-by: Mike Rapoport > --- > tools/testing/selftests/vm/userfaultfd.c | 7

Re: [PATCH 3/3] userfaultfd: selftest: recycle lock threads first

2018-09-29 Thread Mike Rapoport
ppens every time of the run possibly because in that new test we'll > need to service two page faults for each lock operation. > > Signed-off-by: Peter Xu Acked-by: Mike Rapoport > --- > tools/testing/selftests/vm/userfaultfd.c | 11 ++- > 1 file changed, 6 insertio

Re: [PATCH 2/3] userfaultfd: selftest: generalize read and poll

2018-09-29 Thread Mike Rapoport
On Sat, Sep 29, 2018 at 04:43:10PM +0800, Peter Xu wrote: > We do very similar things in read and poll modes, but we're copying the > codes around. Share the codes properly on reading the message and > handling the page fault to make the code cleaner. Meanwhile this solves > previous mismatch of

Re: [PATCH 1/3] userfaultfd: selftest: cleanup help messages

2018-09-29 Thread Mike Rapoport
olete too. Use a > single usage() helper. > > Signed-off-by: Peter Xu Small comment below, otherwise Acked-by: Mike Rapoport > --- > tools/testing/selftests/vm/userfaultfd.c | 44 ++-- > 1 file changed, 26 insertions(+), 18 deletions(-) > >

[PATCH] memblock: remove stale #else and the code it protects

2018-09-27 Thread Mike Rapoport
During removal of HAVE_MEMBLOCK definition, the #else clause of the #ifdef CONFIG_HAVE_MEMBLOCK ... #else ... #endif conditional was not removed. Remove it now. Signed-off-by: Mike Rapoport Reported-by: Alexander Duyck Cc: Michal Hocko

[PATCH] csky: fixups after bootmem removal

2018-09-26 Thread Mike Rapoport
elect DMA_DIRECT_OPS" to arch/csky/Kconfig and it fixed the build, but I really have no idea if this the right thing to do... >From 63c3b24e661e6cad88f0432dd460d35a16741871 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 26 Sep 2018 13:40:13 +0300 Subject: [PATCH] csky: fixups after bo

Re: [PATCH v3 3/4] devres: provide devm_kstrdup_const()

2018-09-24 Thread Mike Rapoport
a corresponding version of devm_kfree(). > > Signed-off-by: Bartosz Golaszewski > Reviewed-by: Bjorn Andersson Acked-by: Mike Rapoport > --- > drivers/base/devres.c | 38 ++ > include/linux/device.h | 3 +++ > 2 files changed, 41 ins

Re: [PATCH v3 2/4] mm: move is_kernel_rodata() to asm-generic/sections.h

2018-09-24 Thread Mike Rapoport
On Mon, Sep 24, 2018 at 12:11:48PM +0200, Bartosz Golaszewski wrote: > Export this routine so that we can use it later in devm_kstrdup_const() > and devm_kfree_const(). > > Signed-off-by: Bartosz Golaszewski > Reviewed-by: Bjorn Andersson Acked-by: Mike Rapoport > --- >

Re: Linux RDMA mini-conf at Plumbers 2018

2018-09-23 Thread Mike Rapoport
On Thu, Sep 20, 2018 at 09:54:28PM +0300, Leon Romanovsky wrote: > On Thu, Sep 20, 2018 at 12:19:23PM -0600, Jason Gunthorpe wrote: > > This is just a friendly reminder that registration deadlines are > > approaching for this conference. Please see > > > >

Re: KSM not working in 4.9 Kernel

2018-09-21 Thread Mike Rapoport
cally, I wanted to understand, is there any problem with the above > output, or it is fine. > If it is fine, how to prove it? The ksm sysfs attributes are described at Documentation/admin-guide/mm/ksm.rst or online at [1]. The numbers look sane in general. The additional pages may come from ma

Re: KSM not working in 4.9 Kernel

2018-09-17 Thread Mike Rapoport
On Mon, Sep 17, 2018 at 05:25:27PM +0530, Pintu Kumar wrote: > On Mon, Sep 17, 2018 at 11:46 AM Pintu Kumar wrote: > > > > But still no effect. > > > > And I checked LTP test cases. It almost doing the same thing. > > > > > > > > I observed that [ksmd] thread is not waking up at all. > > > > I

Re: KSM not working in 4.9 Kernel

2018-09-16 Thread Mike Rapoport
On Sun, Sep 16, 2018 at 10:35:17PM +0530, Pintu Kumar wrote: > On Sun, Sep 16, 2018 at 9:02 PM Mike Rapoport wrote: > > > > On Fri, Sep 14, 2018 at 07:58:01PM +0530, Pintu Kumar wrote: > > > Hi All, > > > > > > Board: Hikey620 ARM64 > > > K

Re: KSM not working in 4.9 Kernel

2018-09-16 Thread Mike Rapoport
On Fri, Sep 14, 2018 at 07:58:01PM +0530, Pintu Kumar wrote: > Hi All, > > Board: Hikey620 ARM64 > Kernel: 4.9.20 > > I am trying to verify KSM (Kernel Same Page Merging) functionality on > 4.9 Kernel using "mmap" and madvise user space test utility. > But to my observation, it seems KSM is not

Re: [PATCH v2] mips: switch to NO_BOOTMEM

2018-09-15 Thread Mike Rapoport
On Fri, Sep 14, 2018 at 12:53:00PM -0700, Paul Burton wrote: > Hi Mike, > > On Mon, Sep 10, 2018 at 12:23:18PM +0300, Mike Rapoport wrote: > > MIPS already has memblock support and all the memory is already registered > > with it. > > > > This patch rep

Re: [PATCH v3 3/3] docs: core-api: add memory allocation guide

2018-09-12 Thread Mike Rapoport
On Tue, Sep 11, 2018 at 11:55:55AM -0600, Jonathan Corbet wrote: > Sorry for being so slow to get to this...it fell into a dark crack in my > rickety email folder hierarchy. I do have one question... > > On Fri, 17 Aug 2018 17:47:16 +0300 > Mike

Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only

2018-09-11 Thread Mike Rapoport
with the > infix *_regulator_* as part of this patch set. > > Intel MID portions tested by Andy. > > Cc: Janusz Krzysztofik # OMAP1 > Cc: Alexander Shiyan # i.MX boards user > Cc: Haojian Zhuang # MMP2 maintainer > Cc: Aaro Koskinen # OMAP1 maintainer > Cc: Mike Rapopo

[PATCH v2] mips: switch to NO_BOOTMEM

2018-09-10 Thread Mike Rapoport
allocations from the high memory. To have the exceptions base in the lower 512M of the physical memory, its allocation in arch/mips/kernel/traps.c::traps_init() is using bottom-up mode. Signed-off-by: Mike Rapoport --- v2: * set memblock limit to max_low_pfn to avoid allocation attempts from

Re: Plumbers 2018 - Performance and Scalability Microconference

2018-09-05 Thread Mike Rapoport
Hi, On Wed, Sep 05, 2018 at 07:51:34PM +, Pasha Tatashin wrote: > > On 9/5/18 2:38 AM, Mike Rapoport wrote: > > On Tue, Sep 04, 2018 at 05:28:13PM -0400, Daniel Jordan wrote: > >> Pavel Tatashin, Ying Huang, and I are excited to be organizing a > >&g

Re: [PATCH RESEND] mips: switch to NO_BOOTMEM

2018-09-05 Thread Mike Rapoport
> > On Wed, Sep 5, 2018 at 9:38 PM Mike Rapoport wrote: > > On Wed, Sep 05, 2018 at 10:47:10AM -0700, Paul Burton wrote: > > Hi Mike, > > > > On Sat, Sep 01, 2018 at 12:17:48AM +0300, Mike Rapoport wrote: > > > On Thu, Aug 30, 2018 at 02:4

Re: [PATCH RESEND] mips: switch to NO_BOOTMEM

2018-09-05 Thread Mike Rapoport
On Wed, Sep 05, 2018 at 10:47:10AM -0700, Paul Burton wrote: > Hi Mike, > > On Sat, Sep 01, 2018 at 12:17:48AM +0300, Mike Rapoport wrote: > > On Thu, Aug 30, 2018 at 02:48:57PM -0700, Paul Burton wrote: > > > On Mon, Aug 27, 2018 at 10:59:35AM +0300, Mike Rapoport wrote:

Re: Plumbers 2018 - Performance and Scalability Microconference

2018-09-05 Thread Mike Rapoport
On Tue, Sep 04, 2018 at 05:28:13PM -0400, Daniel Jordan wrote: > Pavel Tatashin, Ying Huang, and I are excited to be organizing a performance > and scalability microconference this year at Plumbers[*], which is happening > in Vancouver this year. The microconference is scheduled for the morning

Re: [PATCH RESEND] mips: switch to NO_BOOTMEM

2018-08-31 Thread Mike Rapoport
Hi Paul, On Thu, Aug 30, 2018 at 02:48:57PM -0700, Paul Burton wrote: > Hi Mike, > > On Mon, Aug 27, 2018 at 10:59:35AM +0300, Mike Rapoport wrote: > > MIPS already has memblock support and all the memory is already registered > > with it. > > > > This patch rep

Re: [PATCH RESEND 0/7] switch several architectures NO_BOOTMEM

2018-08-29 Thread Mike Rapoport
Any updates on this? On Fri, Aug 03, 2018 at 10:58:43PM +0300, Mike Rapoport wrote: > > Hi, > > These patches perform conversion to NO_BOOTMEM of hexagon, nios2, uml and > unicore32. The architecture maintainers have acked the patches, but, since > I've got no confirmation the

Re: [PATCH 1/2] devres: provide devm_kstrdup_const()

2018-08-28 Thread Mike Rapoport
On Mon, Aug 27, 2018 at 04:28:55PM +0200, Bartosz Golaszewski wrote: > 2018-08-27 12:33 GMT+02:00 Mike Rapoport : > > On Mon, Aug 27, 2018 at 10:21:00AM +0200, Bartosz Golaszewski wrote: > >> Provide a resource managed version of kstrdup_const(). This variant > >> in

Re: [PATCH v2 4/4] userfaultfd: selftest: Cope if shmem doesn't support zeropage

2018-08-28 Thread Mike Rapoport
On Mon, Aug 27, 2018 at 11:46:33PM -0300, Thiago Jung Bauermann wrote: > > Hello Mike, > > Mike Rapoport writes: > > > Hi, > > > > On Fri, Aug 03, 2018 at 07:00:46PM -0300, Thiago Jung Bauermann wrote: > >> If userfaultfd runs on a system that doesn

Re: [PATCH 2/2] clk: pmc-atom: use devm_kstrdup_const()

2018-08-27 Thread Mike Rapoport
On Mon, Aug 27, 2018 at 02:58:46PM +0200, Bartosz Golaszewski wrote: > 2018-08-27 14:52 GMT+02:00 Mike Rapoport : > > On Mon, Aug 27, 2018 at 02:28:45PM +0200, Bartosz Golaszewski wrote: > >> 2018-08-27 12:39 GMT+02:00 Mike Rapoport : > >> > On Mon, Aug 27, 201

Re: [PATCH 2/2] clk: pmc-atom: use devm_kstrdup_const()

2018-08-27 Thread Mike Rapoport
On Mon, Aug 27, 2018 at 02:28:45PM +0200, Bartosz Golaszewski wrote: > 2018-08-27 12:39 GMT+02:00 Mike Rapoport : > > On Mon, Aug 27, 2018 at 10:21:01AM +0200, Bartosz Golaszewski wrote: > >> Use devm_kstrdup_const() in the pmc-atom driver. This mostly serves as > >&g

Re: [PATCH 2/2] clk: pmc-atom: use devm_kstrdup_const()

2018-08-27 Thread Mike Rapoport
On Mon, Aug 27, 2018 at 10:21:01AM +0200, Bartosz Golaszewski wrote: > Use devm_kstrdup_const() in the pmc-atom driver. This mostly serves as > an example of how to use this new routine to shrink driver code. > > While we're at it: replace a call to kcalloc() with devm_kcalloc(). > >

Re: [PATCH 1/2] devres: provide devm_kstrdup_const()

2018-08-27 Thread Mike Rapoport
On Mon, Aug 27, 2018 at 10:21:00AM +0200, Bartosz Golaszewski wrote: > Provide a resource managed version of kstrdup_const(). This variant > internally calls devm_kstrdup() on pointers that are outside of > .rodata section. Also provide a corresponding version of devm_kfree(). > > Signed-off-by:

[PATCH RESEND] mips: switch to NO_BOOTMEM

2018-08-27 Thread Mike Rapoport
MIPS already has memblock support and all the memory is already registered with it. This patch replaces bootmem memory reservations with memblock ones and removes the bootmem initialization. Signed-off-by: Mike Rapoport --- arch/mips/Kconfig | 1 + arch/mips/kernel

[PATCH v2 0/3] docs/core-api: add memory allocation guide

2018-08-16 Thread Mike Rapoport
[2] https://lkml.org/lkml/2018/7/26/684 Mike Rapoport (3): docs: core-api/gfp_mask-from-fs-io: add a label for cross-referencing docs: core-api/mm-api: add a lable for GFP flags section docs: core-api: add memory allocation guide Documentation/core-api/gfp_mask-from-fs-io.rst | 2 + Document

[PATCH v2 3/3] docs: core-api: add memory allocation guide

2018-08-16 Thread Mike Rapoport
Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- Documentation/core-api/index.rst | 1 + Documentation/core-api/memory-allocation.rst | 124 +++ 2 files changed, 125 insertions(+) create mode 100644 Documentation/core-api/memory-allocation.rst diff

Re: [PATCH v3] resource: Merge resources on a node when hot-adding memory

2018-08-09 Thread Mike Rapoport
ource fragmentation) we attempt to > merge contiguous resources on the node. > > Signed-off-by: Rashmica Gupta Reviewed-by: Mike Rapoport > --- > v2->v3: Update Xen balloon, make the commit msg and a comment clearer, > and changed '>' to '>=' when comparing the end of a re

Re: [PATCH] mips: switch to NO_BOOTMEM

2018-08-09 Thread Mike Rapoport
On Wed, Aug 08, 2018 at 02:42:15PM -0700, Paul Burton wrote: > Hi Sergey & Mike, > > On Thu, Aug 09, 2018 at 12:30:03AM +0300, Fancer's opinion wrote: > > Hello Mike, > > I haven't read your patch text yet. I am waiting for the subsystem > > maintainers response at least > > about the necessity

Re: [PATCH v2 4/4] userfaultfd: selftest: Cope if shmem doesn't support zeropage

2018-08-07 Thread Mike Rapoport
s at the ioctl verification. Split out the verification that supported ioctls are superset of the expected ioctls and relax the checks for UFFDIO_ZEROPAGE for shared memory areas. Signed-off-by: Mike Rapoport --- tools/testing/selftests/vm/userfaultfd.c | 63 +--- 1 file changed,

Re: [PATCH v2 3/4] userfaultfd: selftest: Skip test if a feature isn't supported

2018-08-07 Thread Mike Rapoport
gt; testing events (fork, remap, remove): userfaults: 160 > # echo $? > 0 > > While at it, also improve the error message of the ioctl(UFFDIO_API) call. > > Signed-off-by: Thiago Jung Bauermann Acked-by: Mike Rapoport > --- > tools/testing/selftests/vm/userfaul

Re: [PATCH v2 2/4] userfaultfd: selftest: Skip test if userfaultfd() syscall not supported

2018-08-07 Thread Mike Rapoport
mplemented > # echo $? > 4 > > Suggested-by: Mike Rapoport > Signed-off-by: Thiago Jung Bauermann Acked-by: Mike Rapoport > --- > tools/testing/selftests/vm/userfaultfd.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/tools/test

Re: [PATCH v2 1/4] userfaultfd: selftest: Fix checking of userfaultfd_open() result

2018-08-07 Thread Mike Rapoport
ion of the test as a whole is the one used by > userfault_open(), fix its callers instead. Now the test behaves correctly: > > # ./userfaultfd anon 30 1 > nr_pages: 480, nr_pages_per_cpu: 120 > userfaultfd syscall not available in this kernel > > Signed-off-by: Thia

Re: [PATCH v2] resource: Merge resources on a node when hot-adding memory

2018-08-06 Thread Mike Rapoport
On Mon, Aug 06, 2018 at 04:52:24PM +1000, Rashmica Gupta wrote: > When hot-removing memory release_mem_region_adjustable() splits > iomem resources if they are not the exact size of the memory being > hot-deleted. Adding this memory back to the kernel adds a new > resource. > > Eg a node has

[PATCH v2 3/3] sparc32: split ramdisk detection and reservation to a helper function

2018-08-06 Thread Mike Rapoport
block into a separate helper function. Signed-off-by: Mike Rapoport Suggested-by: Sam Ravnborg --- arch/sparc/mm/init_32.c | 56 +++-- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index

[PATCH v2 1/3] sparc: mm/init_32: kill trailing whitespace

2018-08-06 Thread Mike Rapoport
Signed-off-by: Mike Rapoport --- arch/sparc/mm/init_32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index 95fe4f0..3ec10b2 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -133,7 +133,7

[PATCH v2 0/3] sparc32: switch to NO_BOOTMEM

2018-08-06 Thread Mike Rapoport
] https://lkml.org/lkml/2018/8/2/403 Mike Rapoport (3): sparc: mm/init_32: kill trailing whitespace sparc32: switch to NO_BOOTMEM sparc32: split ramdisk detection and reservation to a helper function arch/sparc/Kconfig | 4 +- arch/sparc/mm/init_32.c | 127

[PATCH v2 2/3] sparc32: switch to NO_BOOTMEM

2018-08-06 Thread Mike Rapoport
Each populated sparc_phys_bank is added to memblock.memory. The reserve_bootmem() calls are replaced with memblock_reserve(), and the bootmem bitmap initialization is droppped. Signed-off-by: Mike Rapoport --- arch/sparc/Kconfig | 4 +-- arch/sparc/mm/init_32.c | 75

[PATCH 3/7] nios2: use generic early_init_dt_add_memory_arch

2018-08-03 Thread Mike Rapoport
All we have to do is to enable memblock, the generic FDT code will take care of the rest. Signed-off-by: Mike Rapoport Acked-by: Ley Foon Tan --- arch/nios2/Kconfig| 1 + arch/nios2/kernel/prom.c | 10 -- arch/nios2/kernel/setup.c | 2 ++ 3 files changed, 3 insertions(+), 10

[PATCH 7/7] unicore32: switch to NO_BOOTMEM

2018-08-03 Thread Mike Rapoport
initialization and leaves memblock as the only boot time memory manager for unicore32. Signed-off-by: Mike Rapoport Acked-by: Guan Xuetao --- arch/unicore32/Kconfig | 1 + arch/unicore32/mm/init.c | 54 +--- 2 files changed, 2 insertions(+), 53

[PATCH 2/7] of: ignore sub-page memory regions

2018-08-03 Thread Mike Rapoport
0 after rounding in early_init_dt_add_memory_arch") introduced a test for wrap around for the case when base is not page aligned, the same test can be used to ignore sub-page region sizes. Signed-off-by: Mike Rapoport Reviewed-by: Rob Herring --- drivers/of/fdt.c | 11 ++- 1 fi

[PATCH 6/7] um: switch to NO_BOOTMEM

2018-08-03 Thread Mike Rapoport
Replace bootmem initialization with memblock_add and memblock_reserve calls and explicit initialization of {min,max}_low_pfn. Signed-off-by: Mike Rapoport Acked-by: Richard Weinberger --- arch/um/Kconfig.common | 2 ++ arch/um/kernel/physmem.c | 20 +--- 2 files changed, 11

[PATCH 5/7] um: setup_physmem: stop using global variables

2018-08-03 Thread Mike Rapoport
The setup_physmem() function receives uml_physmem and uml_reserved as parameters and still used these global variables. Replace such usage with local variables. Signed-off-by: Mike Rapoport Acked-by: Richard Weinberger --- arch/um/kernel/physmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH RESEND 0/7] switch several architectures NO_BOOTMEM

2018-08-03 Thread Mike Rapoport
Hi, These patches perform conversion to NO_BOOTMEM of hexagon, nios2, uml and unicore32. The architecture maintainers have acked the patches, but, since I've got no confirmation the patches are going through the arch tree I'd appreciate if the set would be applied to the -mm tree. Mike

[PATCH 1/7] hexagon: switch to NO_BOOTMEM

2018-08-03 Thread Mike Rapoport
This patch adds registration of the system memory with memblock, eliminates bootmem initialization and converts early memory reservations from bootmem to memblock. Signed-off-by: Mike Rapoport Acked-by: Richard Kuo --- arch/hexagon/Kconfig | 3 +++ arch/hexagon/mm/init.c | 20

[PATCH 4/7] nios2: switch to NO_BOOTMEM

2018-08-03 Thread Mike Rapoport
Remove bootmem bitmap initialization and replace reserve_bootmem() with memblock_reserve(). Signed-off-by: Mike Rapoport Acked-by: Ley Foon Tan --- arch/nios2/Kconfig| 2 ++ arch/nios2/kernel/prom.c | 7 --- arch/nios2/kernel/setup.c | 37 + 3

[PATCH 0/2] sparc32: switch to NO_BOOTMEM

2018-08-02 Thread Mike Rapoport
Hi, These patches convert sparc32 to use memblock + nobootmem. I've made the conversion as simple as possible, just enough to allow moving HAVE_MEMBLOCK and NO_BOOTMEM to the common SPARC configuration. Mike Rapoport (2): sparc32: switch to NO_BOOTMEM sparc32: tidy up ramdisk memory

Re: [PATCH] mips: switch to NO_BOOTMEM

2018-08-02 Thread Mike Rapoport
lso > can try to combine it with this patch, if it is found convenient. So, what would be the best way to move forward? > Regards, > -Sergey > > > On Thu, 26 Jul 2018, 20:20 Paul Burton, wrote: > > Hi Mike, > > On Thu, Jul 26, 2018 at 10:03:56AM +0300, Mike Ra

[PATCH 2/2] sparc32: tidy up ramdisk memory reservation

2018-08-02 Thread Mike Rapoport
-by: Mike Rapoport --- arch/sparc/mm/init_32.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index 5117a5e..b5d8f90 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -161,6 +161,8

  1   2   3   4   5   6   >