fix filler_t callback type mismatches v2

2019-05-19 Thread Christoph Hellwig
Casting mapping->a_ops->readpage to filler_t causes an indirect call type mismatch with Control-Flow Integrity checking. This change fixes the mismatch in read_cache_page_gfp and read_mapping_page by adding using a NULL filler argument as an indication to call ->readpage directly, and by passing

Re: PROBLEM: Power9: kernel oops on memory hotunplug from ppc64le guest

2019-05-19 Thread Bharata B Rao
On Mon, May 20, 2019 at 02:48:35PM +1000, Nicholas Piggin wrote: > >> > git bisect points to > >> > > >> > commit 4231aba000f5a4583dd9f67057aadb68c3eca99d > >> > Author: Nicholas Piggin > >> > Date: Fri Jul 27 21:48:17 2018 +1000 > >> > > >> > powerpc/64s: Fix page table fragment refcount

[PATCH 3/4] jffs2: pass the correct prototype to read_cache_page

2019-05-19 Thread Christoph Hellwig
Fix the callback jffs2 passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook --- fs/jffs2/file.c | 4 ++--

[PATCH 4/4] 9p: pass the correct prototype to read_cache_page

2019-05-19 Thread Christoph Hellwig
Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook --- fs/9p/vfs_addr.c | 6 -- 1 file changed,

[PATCH 2/4] mm: don't cast ->readpage to filler_t for do_read_cache_page

2019-05-19 Thread Christoph Hellwig
We can just pass a NULL filler and do the right thing inside of do_read_cache_page based on the NULL parameter. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook --- include/linux/pagemap.h | 3 +-- mm/filemap.c| 10 ++ 2 files changed, 7 insertions(+), 6

[PATCH 1/4] mm: fix an overly long line in read_cache_page

2019-05-19 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook --- mm/filemap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index c5af80c43d36..6a8048477bc6 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2862,7 +2862,8 @@ struct page

Re: [RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation

2019-05-19 Thread Christoph Hellwig
Folks, you can't just pass arbitary GFP_ flags to dma allocation routines, beause very often they are not just wrappers around the page allocator. So no, you can't just fine grained control the flags, but the existing code is just as buggy. Please switch to use memalloc_noio_save() instead.

Re: arch/xtensa/include/asm/uaccess.h:40:22: error: implicit declaration of function 'uaccess_kernel'; did you mean 'getname_kernel'?

2019-05-19 Thread Max Filippov
Hello, On Sun, May 19, 2019 at 10:39 PM kbuild test robot wrote: > Hi Matt, > > FYI, the error/warning still remains. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: a188339ca5a396acc588e5851ed7e19f66b0ebd9 > commit:

Re: [PATCH] intel_th: msu: Fix unused variable warning on arm64 platform

2019-05-19 Thread Zhangshaokun
please ignore this patch, I will update it and resend it. On 2019/5/20 11:23, Shaokun Zhang wrote: > Fix this compiler warning on arm64 platform. > > Cc: Alexander Shishkin > Cc: Greg Kroah-Hartman > Signed-off-by: Shaokun Zhang > --- > drivers/hwtracing/intel_th/msu.c | 8 +++- > 1 file

[RFC PATCH v5 12/16] slub: Enable moving objects to/from specific nodes

2019-05-19 Thread Tobin C. Harding
We have just implemented Slab Movable Objects (object migration). Currently object migration is used to defrag a cache. On NUMA systems it would be nice to be able to control the source and destination nodes when moving objects. Add CONFIG_SMO_NODE to guard this feature. CONFIG_SMO_NODE depends

[RFC PATCH v5 15/16] dcache: Implement partial shrink via Slab Movable Objects

2019-05-19 Thread Tobin C. Harding
The dentry slab cache is susceptible to internal fragmentation. Now that we have Slab Movable Objects we can attempt to defragment the dcache. Dentry objects are inherently _not_ relocatable however under some conditions they can be free'd. This is the same as shrinking the dcache but instead

[RFC PATCH v5 13/16] slub: Enable balancing slabs across nodes

2019-05-19 Thread Tobin C. Harding
We have just implemented Slab Movable Objects (SMO). On NUMA systems slabs can become unbalanced i.e. many slabs on one node while other nodes have few slabs. Using SMO we can balance the slabs across all the nodes. The algorithm used is as follows: 1. Move all objects to node 0 (this has the

[RFC PATCH v5 16/16] dcache: Add CONFIG_DCACHE_SMO

2019-05-19 Thread Tobin C. Harding
In an attempt to make the SMO patchset as non-invasive as possible add a config option CONFIG_DCACHE_SMO (under "Memory Management options") for enabling SMO for the DCACHE. Whithout this option dcache constructor is used but no other code is built in, with this option enabled slab mobility is

[RFC PATCH v5 11/16] tools/testing/slab: Add XArray movable objects tests

2019-05-19 Thread Tobin C. Harding
We just implemented movable objects for the XArray. Let's test it intree. Add test module for the XArray's movable objects implementation. Functionality of the XArray Slab Movable Object implementation can usually be seen by simply by using `slabinfo` on a running machine since the radix tree

[RFC PATCH v5 14/16] dcache: Provide a dentry constructor

2019-05-19 Thread Tobin C. Harding
In order to support object migration on the dentry cache we need to have a determined object state at all times. Without a constructor the object would have a random state after allocation. Provide a dentry constructor. Signed-off-by: Tobin C. Harding --- fs/dcache.c | 30

[RFC PATCH v5 05/16] tools/vm/slabinfo: Add remote node defrag ratio output

2019-05-19 Thread Tobin C. Harding
Add output line for NUMA remote node defrag ratio. Signed-off-by: Tobin C. Harding --- tools/vm/slabinfo.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c index cbfc56c44c2f..d2c22f9ee2d8 100644 --- a/tools/vm/slabinfo.c +++

[RFC PATCH v5 08/16] tools/testing/slab: Add object migration test suite

2019-05-19 Thread Tobin C. Harding
We just added a module that enables testing the SLUB allocators ability to defrag/shrink caches via movable objects. Tests are better when they are automated. Add automated testing via a python script for SLUB movable objects. Example output: $ cd path/to/linux/tools/testing/slab $

[RFC PATCH v5 07/16] tools/testing/slab: Add object migration test module

2019-05-19 Thread Tobin C. Harding
We just implemented slab movable objects for the SLUB allocator. We should test that code. In order to do so we need to be able to do a number of things - Create a cache - Enable Slab Movable Objects for the cache - Allocate objects to the cache - Free objects from within specific slabs of

[RFC PATCH v5 06/16] tools/vm/slabinfo: Add defrag_used_ratio output

2019-05-19 Thread Tobin C. Harding
Add output for the newly added defrag_used_ratio sysfs knob. Signed-off-by: Tobin C. Harding --- tools/vm/slabinfo.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c index d2c22f9ee2d8..ef4ff93df4cc 100644 --- a/tools/vm/slabinfo.c +++

[RFC PATCH v5 09/16] lib: Separate radix_tree_node and xa_node slab cache

2019-05-19 Thread Tobin C. Harding
Earlier, Slab Movable Objects (SMO) was implemented. The XArray is now able to take advantage of SMO in order to make xarray nodes movable (when using the SLUB allocator). Currently the radix tree uses the same slab cache as the XArray. Only XArray nodes are movable _not_ radix tree nodes. We

[RFC PATCH v5 10/16] xarray: Implement migration function for xa_node objects

2019-05-19 Thread Tobin C. Harding
Recently Slab Movable Objects (SMO) was implemented for the SLUB allocator. The XArray can take advantage of this and make the xa_node slab cache objects movable. Implement functions to migrate objects and activate SMO when we initialise the XArray slab cache. This is based on initial code by

[RFC PATCH v5 03/16] slub: Sort slab cache list

2019-05-19 Thread Tobin C. Harding
It is advantageous to have all defragmentable slabs together at the beginning of the list of slabs so that there is no need to scan the complete list. Put defragmentable caches first when adding a slab cache and others last. Co-developed-by: Christoph Lameter Signed-off-by: Tobin C. Harding ---

[RFC PATCH v5 04/16] slub: Slab defrag core

2019-05-19 Thread Tobin C. Harding
Internal fragmentation can occur within pages used by the slub allocator. Under some workloads large numbers of pages can be used by partial slab pages. This under-utilisation is bad simply because it wastes memory but also because if the system is under memory pressure higher order allocations

[RFC PATCH v5 02/16] tools/vm/slabinfo: Add support for -C and -M options

2019-05-19 Thread Tobin C. Harding
-C lists caches that use a ctor. -M lists caches that support object migration. Add command line options to show caches with a constructor and caches that are movable (i.e. have migrate function). Co-developed-by: Christoph Lameter Signed-off-by: Tobin C. Harding --- tools/vm/slabinfo.c | 40

[RFC PATCH v5 00/16] Slab Movable Objects (SMO)

2019-05-19 Thread Tobin C. Harding
Hi, Another iteration of the SMO patch set, updates to this version are restricted to the XArray patches (#9 and #10 and tested with module implemented in #11). Applies on top of Linus' tree (tag: v5.2-rc1). This is a patch set implementing movable objects within the SLUB allocator. This is

[RFC PATCH v5 01/16] slub: Add isolate() and migrate() methods

2019-05-19 Thread Tobin C. Harding
Add the two methods needed for moving objects and enable the display of the callbacks via the /sys/kernel/slab interface. Add documentation explaining the use of these methods and the prototypes for slab.h. Add functions to setup the callbacks method for a slab cache. Add empty functions for

[PATCH v1 5/9] perf diff: Use hists to manage basic blocks

2019-05-19 Thread Jin Yao
The function hist__account_cycles() can account cycles per basic block. The basic block information are saved in a per-symbol cycles_hist structure. This patch processes each symbol, get basic blocks from cycles_hist and add the basic block entry to a hists. Using a hists is because we need to

[PATCH v1 4/9] perf diff: Get a list of symbols(functions)

2019-05-19 Thread Jin Yao
We already have a function hist__account_cycles() which can be used to account cycles per basic block in symbol/function. But we also need to know what the symbols are, since we need to get basic blocks of all symbols(functions) before diff. This patch records the sorted symbols in sym_hists,

[PATCH v1 0/9] perf diff: diff cycles at basic block level

2019-05-19 Thread Jin Yao
In some cases small changes in hot loops can show big differences. But it's difficult to identify these differences. perf diff currently can only diff symbols (functions). We can also expand it to diff cycles of individual programs blocks as reported by timed LBR. This would allow to identify

[PATCH v1 3/9] perf diff: Check if all data files with branch stacks

2019-05-19 Thread Jin Yao
We will expand perf diff to support diff cycles of individual programs blocks, so it requires all data files having branch stacks. This patch checks HEADER_BRANCH_STACK in header, and only set the flag has_br_stack when HEADER_BRANCH_STACK are set in all data files. Signed-off-by: Jin Yao ---

[PATCH v1 2/9] perf util: Add block_info in hist_entry

2019-05-19 Thread Jin Yao
The block_info contains the program basic block information, i.e, contains the start address and the end address of this basic block and how much cycles it takes. We need to compare, sort and even print out the basic block by some orders, i.e. sort by cycles. For this purpose, we add block_info

[PATCH v1 1/9] perf util: Create block_info structure

2019-05-19 Thread Jin Yao
perf diff currently can only diff symbols(functions). We should expand it to diff cycles of individual programs blocks as reported by timed LBR. This would allow to identify changes in specific code accurately. We need a new structure to maintain the basic block information, such as,

[PATCH v1 9/9] perf diff: Documentation --basic-block option

2019-05-19 Thread Jin Yao
Documentation the new option '--basic-block'. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt index da7809b..b242af8 100644 ---

[PATCH v1 7/9] perf diff: Compute cycles diff of basic blocks

2019-05-19 Thread Jin Yao
In previous patch, we have already linked up the same basic blocks. Now we compute the cycles diff value of basic blocks, in order to sort by diff cycles later. Signed-off-by: Jin Yao --- tools/perf/builtin-diff.c | 31 +++ tools/perf/util/sort.h| 2 ++ 2 files

[PATCH v1 8/9] perf diff: Print the basic block cycles diff

2019-05-19 Thread Jin Yao
Currently we only support sorting by diff cycles. For example, perf record -b ./div perf record -b ./div perf diff --basic-block # Cycles diff Basic block (start:end) # ... ... # -20 native_write_msr (7fff9a069900:7fff9a06990b) -3

[PATCH v1 6/9] perf diff: Link same basic blocks among different data files

2019-05-19 Thread Jin Yao
The target is to compare the performance difference (cycles diff) for the same basic blocks in different data files. The same basic block means same function, same start address and same end address. This patch finds the same basic blocks from different data files and link them together.

Re: [PATCH] mm/dev_pfn: Exclude MEMORY_DEVICE_PRIVATE while computing virtual address

2019-05-19 Thread Anshuman Khandual
On 05/18/2019 03:20 AM, Andrew Morton wrote: > On Fri, 17 May 2019 16:08:34 +0530 Anshuman Khandual > wrote: > >> The presence of struct page does not guarantee linear mapping for the pfn >> physical range. Device private memory which is non-coherent is excluded >> from linear mapping during

[PATCH V4 3/4] arm64/mm: Hold memory hotplug lock while walking for kernel page table dump

2019-05-19 Thread Anshuman Khandual
The arm64 page table dump code can race with concurrent modification of the kernel page tables. When a leaf entries are modified concurrently, the dump code may log stale or inconsistent information for a VA range, but this is otherwise not harmful. When intermediate levels of table are freed,

[PATCH V4 1/4] mm/hotplug: Reorder arch_remove_memory() call in __remove_memory()

2019-05-19 Thread Anshuman Khandual
Memory hot remove uses get_nid_for_pfn() while tearing down linked sysfs entries between memory block and node. It first checks pfn validity with pfn_valid_within() before fetching nid. With CONFIG_HOLES_IN_ZONE config (arm64 has this enabled) pfn_valid_within() calls pfn_valid(). pfn_valid() is

[PATCH V4 2/4] arm64/mm: Inhibit huge-vmap with ptdump

2019-05-19 Thread Anshuman Khandual
From: Mark Rutland The arm64 ptdump code can race with concurrent modification of the kernel page tables. At the time this was added, this was sound as: * Modifications to leaf entries could result in stale information being logged, but would not result in a functional problem. * Boot time

[PATCH V4 4/4] arm64/mm: Enable memory hot remove

2019-05-19 Thread Anshuman Khandual
The arch code for hot-remove must tear down portions of the linear map and vmemmap corresponding to memory being removed. In both cases the page tables mapping these regions must be freed, and when sparse vmemmap is in use the memory backing the vmemmap must also be freed. This patch adds a new

[PATCH V4 0/4] arm64/mm: Enable memory hot remove

2019-05-19 Thread Anshuman Khandual
This series enables memory hot remove on arm64 after fixing a memblock removal ordering problem in generic __remove_memory() and two possible arm64 platform specific kernel page table race conditions. This series is based on latest v5.2-rc1 tag. Testing: Memory hot remove has been tested on

[PATCH] intel-svm: fix typos in code comments

2019-05-19 Thread Weitao Hou
fix acccess to access Signed-off-by: Weitao Hou --- include/linux/intel-svm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/intel-svm.h b/include/linux/intel-svm.h index e3f76315ca4d..8dfead70699c 100644 --- a/include/linux/intel-svm.h +++

Re: PROBLEM: Power9: kernel oops on memory hotunplug from ppc64le guest

2019-05-19 Thread Nicholas Piggin
Bharata B Rao's on May 20, 2019 2:25 pm: > On Mon, May 20, 2019 at 12:02:23PM +1000, Michael Ellerman wrote: >> Bharata B Rao writes: >> > On Thu, May 16, 2019 at 07:44:20PM +0530, srikanth wrote: >> >> Hello, >> >> >> >> On power9 host, performing memory hotunplug from ppc64le guest results in

[PATCH] fddi: fix typos in code comments

2019-05-19 Thread Weitao Hou
fix abord to abort Signed-off-by: Weitao Hou --- drivers/net/fddi/skfp/hwmtm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/fddi/skfp/hwmtm.c b/drivers/net/fddi/skfp/hwmtm.c index abbe309051d9..3d0f417e8586 100644 --- a/drivers/net/fddi/skfp/hwmtm.c +++

[PATCH] mm/failslab: By default, do not fail allocations with direct reclaim only

2019-05-19 Thread Nicolas Boichat
When failslab was originally written, the intention of the "ignore-gfp-wait" flag default value ("N") was to fail GFP_ATOMIC allocations. Those were defined as (__GFP_HIGH), and the code would test for __GFP_WAIT (0x10u). However, since then, __GFP_WAIT was replaced by __GFP_RECLAIM

Re: [PATCH] vfio: vfio_pci_nvlink2: use a vma helper function

2019-05-19 Thread Alexey Kardashevskiy
On 17/05/2019 00:48, Alex Williamson wrote: > [Cc Alexey + kvm] > > On Thu, 16 May 2019 20:38:26 +0800 > "richard.p...@oppo.com" wrote: > >> Use a vma helper function to simply code. >> >> Signed-off-by: Peng Hao >> --- >>  drivers/vfio/pci/vfio_pci_nvlink2.c | 3 +-- >>  1 file changed, 1

Re: [PATCH 6/8] PM / OPP: Support adjusting OPP voltages at runtime

2019-05-19 Thread Viresh Kumar
On 16-05-19, 17:08, Andrew-sh.Cheng wrote: > From: Stephen Boyd > > On some SoCs the Adaptive Voltage Scaling (AVS) technique is > employed to optimize the operating voltage of a device. At a > given frequency, the hardware monitors dynamic factors and either > makes a suggestion for how much to

Re: [PATCH 4/8] dt-bindings: devfreq: add compatible for mt8183 cci devfreq

2019-05-19 Thread Viresh Kumar
On 16-05-19, 17:08, Andrew-sh.Cheng wrote: > From: "Andrew-sh.Cheng" > > This adds dt-binding documentation of cci devfreq > for Mediatek MT8183 SoC platform. > > Signed-off-by: Andrew-sh.Cheng > --- > .../bindings/devfreq/mt8183-cci-devfreq.txt | 20 > > 1 file

Re: [EXT] Re: [PATCH 1/3] enetc: add hardware timestamping support

2019-05-19 Thread Richard Cochran
On Mon, May 20, 2019 at 03:20:23AM +, Y.b. Lu wrote: > > > +config FSL_ENETC_HW_TIMESTAMPING > > > + bool "ENETC hardware timestamping support" > > > + depends on FSL_ENETC || FSL_ENETC_VF > > > + help > > > + Enable hardware timestamping support on the Ethernet packets > > >

Re: [RFC 5/5] cpufreq: add driver for Raspbery Pi

2019-05-19 Thread Viresh Kumar
On 17-05-19, 17:35, Nicolas Saenz Julienne wrote: > Raspberry Pi's firmware offers and interface though which update it's > performance requirements. It allows us to request for specific runtime > frequencies, which the firmware might or might not respect, depending on > the firmware configuration

[PATCH] kvm: vmx: Fix -Wmissing-prototypes warnings

2019-05-19 Thread Yi Wang
We get a warning when build kernel W=1: arch/x86/kvm/vmx/vmx.c:6365:6: warning: no previous prototype for ‘vmx_update_host_rsp’ [-Wmissing-prototypes] void vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp) Add the missing declaration to fix this. Signed-off-by: Yi Wang ---

Re: PROBLEM: Power9: kernel oops on memory hotunplug from ppc64le guest

2019-05-19 Thread Bharata B Rao
On Mon, May 20, 2019 at 12:02:23PM +1000, Michael Ellerman wrote: > Bharata B Rao writes: > > On Thu, May 16, 2019 at 07:44:20PM +0530, srikanth wrote: > >> Hello, > >> > >> On power9 host, performing memory hotunplug from ppc64le guest results in > >> kernel oops. > >> > >> Kernel used :

Re: [PATCH v3 3/3] i2c-ocores: sifive: add polling mode workaround for FU540-C000 SoC

2019-05-19 Thread Sagar Kadam
Hi Andrew, On Thu, May 16, 2019 at 6:37 PM Andrew Lunn wrote: > > On Thu, May 16, 2019 at 10:38:40AM +0530, Sagar Shrikant Kadam wrote: > > The i2c-ocore driver already has a polling mode interface.But it needs > > a workaround for FU540 Chipset on HiFive unleashed board (RevA00). > > There is

arch/xtensa/include/asm/uaccess.h:40:22: error: implicit declaration of function 'uaccess_kernel'; did you mean 'getname_kernel'?

2019-05-19 Thread kbuild test robot
Hi Matt, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a188339ca5a396acc588e5851ed7e19f66b0ebd9 commit: 7df95299b94a63ec67a6389fc02dc25019a80ee8 staging: kpc2000: Add DMA driver date: 4 weeks ago config:

drivers//pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'

2019-05-19 Thread kbuild test robot
Hi Amelie, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a188339ca5a396acc588e5851ed7e19f66b0ebd9 commit: 1490d9f841b186664f9d3ca213dcfa4464a60680 pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver date: 10

ERROR: "uio_unregister_device" [drivers/staging/kpc2000/kpc2000/kpc2000.ko] undefined!

2019-05-19 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a188339ca5a396acc588e5851ed7e19f66b0ebd9 commit: 7dc7967fc39af81191558f63eeaf3d2b83899b1c staging: kpc2000: add initial set of Daktronics drivers date: 4 weeks ago config: x86_64-randconfig-m3-05200349

Re: [PATCH v2] pstore: Add boot loader log messages support

2019-05-19 Thread Yue Hu
On Wed, 15 May 2019 15:04:09 -0700 Kees Cook wrote: > Hi! > > Thanks for the reminder to review this code. :) Sorry for the delay! > > On Thu, Feb 14, 2019 at 11:49 PM Yue Hu wrote: > > > > From: Yue Hu > > > > Sometimes we hope to check boot loader log messages (e.g. Android > > Verified

Re: [PATCH v3] kbuild: check uniqueness of module names

2019-05-19 Thread Masahiro Yamada
On Mon, May 20, 2019 at 8:52 AM Stephen Rothwell wrote: > > Hi Masahiro, > > On Sat, 18 May 2019 01:07:15 +0900 Masahiro Yamada > wrote: > > > > It checks not only real modules, but also built-in modules (i.e. > > controlled by tristate CONFIG option, but currently compiled with =y). > >

[RFC 7/7] mm: madvise support MADV_ANONYMOUS_FILTER and MADV_FILE_FILTER

2019-05-19 Thread Minchan Kim
System could have much faster swap device like zRAM. In that case, swapping is extremely cheaper than file-IO on the low-end storage. In this configuration, userspace could handle different strategy for each kinds of vma. IOW, they want to reclaim anonymous pages by MADV_COLD while it keeps

[RFC 4/7] mm: factor out madvise's core functionality

2019-05-19 Thread Minchan Kim
This patch factor out madvise's core functionality so that upcoming patch can reuse it without duplication. It shouldn't change any behavior. Signed-off-by: Minchan Kim --- mm/madvise.c | 168 +++ 1 file changed, 89 insertions(+), 79 deletions(-)

[RFC 3/7] mm: introduce MADV_COLD

2019-05-19 Thread Minchan Kim
When a process expects no accesses to a certain memory range for a long time, it could hint kernel that the pages can be reclaimed instantly but data should be preserved for future use. This could reduce workingset eviction so it ends up increasing performance. This patch introduces the new

[RFC 5/7] mm: introduce external memory hinting API

2019-05-19 Thread Minchan Kim
There is some usecase that centralized userspace daemon want to give a memory hint like MADV_[COOL|COLD] to other process. Android's ActivityManagerService is one of them. It's similar in spirit to madvise(MADV_WONTNEED), but the information required to make the reclaim decision is not known to

[RFC 6/7] mm: extend process_madvise syscall to support vector arrary

2019-05-19 Thread Minchan Kim
Currently, process_madvise syscall works for only one address range so user should call the syscall several times to give hints to multiple address range. This patch extends process_madvise syscall to support multiple hints, address ranges and return vaules so user could give hints all at once.

[RFC 2/7] mm: change PAGEREF_RECLAIM_CLEAN with PAGE_REFRECLAIM

2019-05-19 Thread Minchan Kim
The local variable references in shrink_page_list is PAGEREF_RECLAIM_CLEAN as default. It is for preventing to reclaim dirty pages when CMA try to migrate pages. Strictly speaking, we don't need it because CMA didn't allow to write out by .may_writepage = 0 in reclaim_clean_pages_from_list.

[RFC 1/7] mm: introduce MADV_COOL

2019-05-19 Thread Minchan Kim
When a process expects no accesses to a certain memory range it could hint kernel that the pages can be reclaimed when memory pressure happens but data should be preserved for future use. This could reduce workingset eviction so it ends up increasing performance. This patch introduces the new

[RFC 0/7] introduce memory hinting API for external process

2019-05-19 Thread Minchan Kim
- Background The Android terminology used for forking a new process and starting an app from scratch is a cold start, while resuming an existing app is a hot start. While we continually try to improve the performance of cold starts, hot starts will always be significantly less power hungry as

Re: [Qemu-devel] [PATCH v9 2/7] virtio-pmem: Add virtio pmem driver

2019-05-19 Thread Pankaj Gupta
> > > > On 5/16/19 10:35 PM, Pankaj Gupta wrote: > > > Can I take it your reviewed/acked-by? or tested-by tag? for the virtio > > > patch :)I don't feel that I have enough expertise to give the reviewed-by > > > tag, but you can > > take my acked-by + tested-by. > > > > Acked-by: Jakub Staron

[PATCH v2] tipc: Avoid copying bytes beyond the supplied data

2019-05-19 Thread Chris Packham
TLV_SET is called with a data pointer and a len parameter that tells us how many bytes are pointed to by data. When invoking memcpy() we need to careful to only copy len bytes. Previously we would copy TLV_LENGTH(len) bytes which would copy an extra 4 bytes past the end of the data pointer which

Re: [Qemu-devel] [PATCH v9 2/7] virtio-pmem: Add virtio pmem driver

2019-05-19 Thread Pankaj Gupta
> On 5/16/19 10:35 PM, Pankaj Gupta wrote: > > Can I take it your reviewed/acked-by? or tested-by tag? for the virtio > > patch :)I don't feel that I have enough expertise to give the reviewed-by > > tag, but you can > take my acked-by + tested-by. > > Acked-by: Jakub Staron > Tested-by: Jakub

linux-next: stats

2019-05-19 Thread Stephen Rothwell
Hi all, As usual, the executive friendly graph is at http://neuling.org/linux-next-size.html :-) (No merge commits counted, next-20190507 was the first linux-next after the merge window opened.) Commits in v5.2-rc1 (relative to v5.1):12064 Commits in next-20190507:

[PATCH] MAINTAINERS: Add mailing list for csky architecture

2019-05-19 Thread guoren
From: Guo Ren Add the newly created linux-c...@vger.kernel.org mailing list for patch reviews and discussions. Signed-off-by: Guo Ren --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5cfbea4..b5fadcc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

RE: [PATCH 1/3] enetc: add hardware timestamping support

2019-05-19 Thread Y.b. Lu
Hi, > -Original Message- > From: Claudiu Manoil > Sent: Thursday, May 16, 2019 11:31 PM > To: Richard Cochran ; Y.b. Lu > > Cc: net...@vger.kernel.org; David Miller ; Shawn > Guo ; Rob Herring ; > devicet...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; >

[PATCH] intel_th: msu: Fix unused variable warning on arm64 platform

2019-05-19 Thread Shaokun Zhang
Fix this compiler warning on arm64 platform. Cc: Alexander Shishkin Cc: Greg Kroah-Hartman Signed-off-by: Shaokun Zhang --- drivers/hwtracing/intel_th/msu.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/hwtracing/intel_th/msu.c

[PATCH] scsi: fix typos in code comments

2019-05-19 Thread Weitao Hou
fix abord to abort Signed-off-by: Weitao Hou --- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 88eef3b18e41..3de57c5a3299 100644 ---

RE: [EXT] Re: [PATCH 1/3] enetc: add hardware timestamping support

2019-05-19 Thread Y.b. Lu
Hi, > -Original Message- > From: Richard Cochran > Sent: Thursday, May 16, 2019 10:33 PM > To: Y.b. Lu > Cc: net...@vger.kernel.org; David Miller ; Claudiu > Manoil ; Shawn Guo ; Rob > Herring ; devicet...@vger.kernel.org; > linux-arm-ker...@lists.infradead.org;

[v3 PATCH] mm: mmu_gather: remove __tlb_reset_range() for force flush

2019-05-19 Thread Yang Shi
A few new fields were added to mmu_gather to make TLB flush smarter for huge page by telling what level of page table is changed. __tlb_reset_range() is used to reset all these page table state to unchanged, which is called by TLB flush for parallel mapping changes for the same range under

Re: [PATCH 1/3] kselftest/cgroup: fix unexcepted testing failure on test_memcontrol

2019-05-19 Thread Alex Shi
> Hi Alex! > > Sorry for the late reply, somehow I missed your e-mails. > > The patchset looks good to me, except a typo in subjects/commit logs: > you probably meant "unexpected failures". > > Please, fix and feel free to use: > Reviewed-by: Roman Gushchin > for the series. > Thanks

[RFC 2/2] ARM: dts: imx6ull/z: add fusable-node property

2019-05-19 Thread Peng Fan
Add fusable-node property for OCOTP Signed-off-by: Peng Fan --- arch/arm/boot/dts/imx6ull.dtsi | 7 +++ arch/arm/boot/dts/imx6ulz.dtsi | 6 ++ 2 files changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi index 22e4a307fa59..b616ed6ee4bf

[RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property

2019-05-19 Thread Peng Fan
Introduce fusable-node property for i.MX OCOTP driver. The property will only be used by Firmware(eg. U-Boot) to runtime disable the nodes. Take i.MX6ULL for example, there are several parts that only have limited modules enabled controlled by OCOTP fuse. It is not flexible to provide several dts

Re: [PATCH RESEND 1/5] ARM: dts: imx6qdl-sabresd: Assign corresponding power supply for LDOs

2019-05-19 Thread Shawn Guo
On Sun, May 12, 2019 at 09:57:20AM +, Anson Huang wrote: > On i.MX6Q/DL SabreSD board, vgen5 supplies vdd1p1/vdd2p5 LDO and > sw2 supplies vdd3p0 LDO, this patch assigns corresponding power > supply for vdd1p1/vdd2p5/vdd3p0 to avoid confusion by below log: > > vdd1p1: supplied by

[PATCH v2 2/3] kselftest/cgroup: fix unexpected testing failure on test_core

2019-05-19 Thread Alex Shi
The cgroup testing relys on the root cgroup's subtree_control setting, If the 'memory' controller isn't set, some test cases will be failed as following: $sudo ./test_core not ok 1 test_cgcore_internal_process_constraint ok 2 test_cgcore_top_down_constraint_enable not ok 3

[PATCH v2 3/3] kselftest/cgroup: fix incorrect test_core skip

2019-05-19 Thread Alex Shi
The test_core will skip the test_cgcore_no_internal_process_constraint_on_threads test case if the 'cpu' controller missing in root's subtree_control. In fact we need to set the 'cpu' in subtree_control, to make the testing meaningful. ./test_core ... ok 4 # skip

[PATCH v2 1/3] kselftest/cgroup: fix unexpected testing failure on test_memcontrol

2019-05-19 Thread Alex Shi
The cgroup testing relies on the root cgroup's subtree_control setting, If the 'memory' controller isn't set, all test cases will be failed as following: $ sudo ./test_memcontrol not ok 1 test_memcg_subtree_control not ok 2 test_memcg_current ok 3 # skip test_memcg_min not ok 4 test_memcg_low not

Re: [PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-19 Thread kbuild test robot
Hi Pierre, I love your patch! Perhaps something to improve: [auto build test WARNING on s390/features] [also build test WARNING on v5.1 next-20190517] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[RFC PATCH] vfio: vfio_iommu_type1: vfio_iommu_type1_caps() can be static

2019-05-19 Thread kbuild test robot
Fixes: f10b2b74bbea ("vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES") Signed-off-by: kbuild test robot --- vfio_iommu_type1.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index

Re: [PATCH RESEND] ARM: dts: imx6ul: add clock-frequency to CPU node

2019-05-19 Thread Shawn Guo
On Sun, May 12, 2019 at 08:57:16AM +, Anson Huang wrote: > Add clock-frequency property to CPU node. Avoids warnings like > "/cpus/cpu@0 missing clock-frequency property" for "arm,cortex-a7". > > Signed-off-by: Anson Huang Applied, thanks.

Re: [v2 PATCH] mm: mmu_gather: remove __tlb_reset_range() for force flush

2019-05-19 Thread Yang Shi
On 5/16/19 11:29 PM, Jan Stancek wrote: - Original Message - On Mon, May 13, 2019 at 04:01:09PM -0700, Yang Shi wrote: On 5/13/19 9:38 AM, Will Deacon wrote: On Fri, May 10, 2019 at 07:26:54AM +0800, Yang Shi wrote: diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c index

Re: [PATCH V12 RESEND 1/3] ARM: imx_v6_v7_defconfig: Add TPM PWM support by default

2019-05-19 Thread Shawn Guo
On Sun, May 12, 2019 at 08:51:15AM +, Anson Huang wrote: > Select CONFIG_PWM_IMX_TPM by default to support i.MX7ULP > TPM PWM. > > Signed-off-by: Anson Huang Applied all, thanks.

[PATCH] kbuild: do not check name uniqueness of builtin modules

2019-05-19 Thread Masahiro Yamada
I just thought it was a good idea to scan builtin.modules in the name uniqueness checking, but Stephen reported a false positive. ppc64_defconfig produces: warning: same basename if the following are built as modules: arch/powerpc/platforms/powermac/nvram.ko drivers/char/nvram.ko ...,

Re: [PATCH v2 3/3] arm64: dts: nxp: frwy-ls1046a: add support for micron nor flash

2019-05-19 Thread Shawn Guo
On Fri, May 10, 2019 at 01:00:24PM +, Pramod Kumar wrote: > add micron nor flash support for ls1046a frwy board. > > Signed-off-by: Ashish Kumar > Signed-off-by: Pramod Kumar Prefix 'arm64: dts: frwy-ls1046a: ...' would be good enough. > --- > .../boot/dts/freescale/fsl-ls1046a-frwy.dts

RE: [PATCH 1/3] enetc: add hardware timestamping support

2019-05-19 Thread Y.b. Lu
> -Original Message- > From: Claudiu Manoil > Sent: Thursday, May 16, 2019 9:31 PM > To: Y.b. Lu ; net...@vger.kernel.org; Richard Cochran > ; David Miller ; Shawn > Guo ; Rob Herring > Cc: devicet...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; > linux-kernel@vger.kernel.org >

Re: [PATCH v2 2/3] arm64: dts: nxp: add ls1046a-frwy board support

2019-05-19 Thread Shawn Guo
On Fri, May 10, 2019 at 01:00:20PM +, Pramod Kumar wrote: > ls1046afrwy board is based on nxp ls1046a SoC. > Board support's 4GB ddr memory, i2c, microSD card, > serial console,qspi nor flash,ifc nand flash,qsgmii network interface, > usb 3.0 and serdes interface to support two x1gen3 pcie

Re: [PATCH v3] tipc: fix modprobe tipc failed after switch order of device registration

2019-05-19 Thread hujunwei
On 2019/5/19 19:48, Stephen Rothwell wrote: > Hi, > > On Sun, 19 May 2019 17:13:45 +0800 hujunwei wrote: >> >> Fixes: 7e27e8d6130c >> ("tipc: switch order of device registration to fix a crash") > > Please don't split Fixes tags over more than one line. It is OK if > they are too long. >

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-19 Thread Chunfeng Yun
Hi, On Fri, 2019-05-17 at 16:05 +0300, Heikki Krogerus wrote: > Hi, > > On Fri, May 17, 2019 at 01:37:36PM +0300, Heikki Krogerus wrote: > > On Tue, May 14, 2019 at 04:47:21PM +0800, Chunfeng Yun wrote: > > > Add fwnode_usb_role_switch_get() to make easier to get > > > usb_role_switch by fwnode

[PATCH v2] kernel: fix typos and some coding style in comments

2019-05-19 Thread Weitao Hou
fix lenght to length Signed-off-by: Weitao Hou --- Changes in v2: - fix space before tab warnings --- kernel/sysctl.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 943c89178e3d..f78f725f225e 100644 ---

Re: [PATCH v2 02/11] ARM: dts: imx7s: Update coresight DT bindings

2019-05-19 Thread Shawn Guo
On Wed, May 08, 2019 at 10:18:53AM +0800, Leo Yan wrote: > CoreSight DT bindings have been updated, thus the old compatible strings > are obsolete and the drivers will report warning if DTS uses these > obsolete strings. > > This patch switches to the new bindings for CoreSight dynamic funnel and

Re: [v3 PATCH] dt-binding: usb: add usb-role-switch property

2019-05-19 Thread Chunfeng Yun
On Fri, 2019-05-17 at 16:27 +0300, Heikki Krogerus wrote: > On Wed, May 08, 2019 at 05:17:44PM +0800, Chunfeng Yun wrote: > > Add a property usb-role-switch to tell the driver that use > > USB Role Switch framework to handle the role switch, > > it's useful when the driver has already supported

RE: [PATCH 2/6] Revert "arm64: dts: renesas: r8a7796: Enable DMA for SCIF2"

2019-05-19 Thread Yoshihiro Shimoda
Hi Eugeniu-san, Geert-san, > From: Eugeniu Rosca, Sent: Tuesday, May 7, 2019 4:43 AM > > > [0] v5.0-rc6 commit 97f26702bc95b5 ("arm64: dts: renesas: r8a7796: Enable > > > DMA for SCIF2") > > > [1] v4.14.106 commit 703db5d1b1759f ("arm64: dts: renesas: r8a7796: > > > Enable DMA for SCIF2") > >

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: relocate chksum_offset for large_nat_bitmap feature

2019-05-19 Thread Chao Yu
On 2019/5/20 1:31, Ju Hyung Park wrote: > Hi Jaegeuk and Chao, > > I was semi-forced today to use the new kernel and test f2fs. > > My Ubuntu initramfs got a bit wonky and I had to boot into live CD and > fix some stuffs. The live CD was using 4.15 kernel, and just mounting > the f2fs partition

  1   2   3   >