Re: [PATCH 2/2] edac: add support for Amazon's Annapurna Labs EDAC

2019-06-02 Thread Hawa, Hanna
On 5/31/2019 4:15 AM, Herrenschmidt, Benjamin wrote: On Thu, 2019-05-30 at 11:19 -0700, Boris Petkov wrote: On May 30, 2019 3:15:29 AM PDT, Hanna Hawa wrote: Add support for error detection and correction for Amazon's Annapurna Labs SoCs for L1/L2 caches. So this should be a driver for t

Re: KASAN: user-memory-access Read in ip6_hold_safe (3)

2019-06-02 Thread Dmitry Vyukov
On Sat, Jun 1, 2019 at 7:15 PM David Ahern wrote: > > On 6/1/19 12:05 AM, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:dfb569f2 net: ll_temac: Fix compile error > > git tree: net-next > syzbot team: > > Is there any way to know the history of

Re: [RFC] printk/sysrq: Don't play with console_loglevel

2019-06-02 Thread Sergey Senozhatsky
On (05/28/19 15:42), Petr Mladek wrote: > On Tue 2019-05-28 13:46:19, Sergey Senozhatsky wrote: > > On (05/28/19 13:15), Sergey Senozhatsky wrote: > > > On (05/28/19 01:24), Dmitry Safonov wrote: > > > [..] > > > > While handling sysrq the console_loglevel is bumped to default to print > > > > sysr

Re: [PATCH v2 0/7] perf diff: diff cycles at basic block level

2019-06-02 Thread Jin, Yao
On 6/3/2019 10:36 PM, Jin Yao wrote: 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 ti

[PATCH V3 2/6] csky: Add reg-io-width property for csky pmu

2019-06-02 Thread Mao Han
csky pmu counter may have different io width. When the counter is smaller then 64 bits and counter value is smaller than the old value, it will result to a extremely large delta value. So the sampled value should be extend to 64 bits to avoid this, the extension bits base on the reg-io-width proper

[PATCH V3 4/6] dt-bindings: csky: Add csky PMU bindings

2019-06-02 Thread Mao Han
This patch adds the documentation to describe that how to add pmu node in dts. Signed-off-by: Mao Han CC: Rob Herring CC: Guo Ren CC: linux-c...@vger.kernel.org --- Documentation/devicetree/bindings/csky/pmu.txt | 38 ++ 1 file changed, 38 insertions(+) create mode 100

[PATCH V3 1/6] csky: Init pmu as a device

2019-06-02 Thread Mao Han
This patch change the csky pmu initialization from arch init to device init. The pmu can be configued with information from device tree(pmu device name, irq number and etc.). Signed-off-by: Mao Han CC: Guo Ren CC: linux-c...@vger.kernel.org --- arch/csky/kernel/perf_event.c | 58 +++

[PATCH V3 6/6] csky: Fix perf record in kernel/user space

2019-06-02 Thread Mao Han
csky_pmu_event_init is called several times during the perf record initialzation. After configure the event counter in either kernel space or user space, csky_pmu_event_init is called twice with no attr specified. Configuration will be overwritten with sampling in both kernel space and user space.

[PATCH V3 0/6] csky: Add pmu hardware sampling support

2019-06-02 Thread Mao Han
This patch set add hardware sampling support for csky-pmu, and also add some properties to pmu node definition. perf can record on hardware event with this patch applied. Changes since v2: - update dt-binding(csky pmu use rising edge interrupt) - use cpuhp_setup_state to enable irq(fix irq ena

[PATCH V3 5/6] csky: Fixup some error count in 810 & 860.

2019-06-02 Thread Mao Han
From: Guo Ren ck810 pmu only support event with index 0-8 and 0xd; ck860 only support event 1~4, 0xa~0x1b. So do not register unsupport event to hardware cache event, which may leader to unknown behavior. Signed-off-by: Guo Ren Signed-off-by: Mao Han CC: Guo Ren CC: linux-c...@vger.kernel.org

[PATCH V3 3/6] csky: Add pmu interrupt support

2019-06-02 Thread Mao Han
This patch add interrupt request and handler for csky pmu. perf can record on hardware event with this patch applied. Signed-off-by: Mao Han CC: Guo Ren CC: linux-c...@vger.kernel.org --- arch/csky/kernel/perf_event.c | 293 +++--- 1 file changed, 277 inserti

[PATCH v2 1/7] perf util: Create block_info structure

2019-06-02 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, symbol(functi

[PATCH v2 4/7] perf diff: Use hists to manage basic blocks per symbol

2019-06-02 Thread Jin Yao
The hist__account_cycles() can account cycles per basic block. The basic block information is saved in cycles_hist structure. This patch processes each symbol, get basic blocks from cycles_hist and add the basic block entries to a new hists (block_hists in hist_entry). Using a hists is because we

[PATCH v2 0/7] perf diff: diff cycles at basic block level

2019-06-02 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 chan

[PATCH v2 6/7] perf diff: Print the basic block cycles diff

2019-06-02 Thread Jin Yao
perf record -b ./div perf record -b ./div Following is the default perf diff output # perf diff # Event 'cycles' # # Baseline Delta Abs Shared Object Symbol # . # 49.03% +0.30% div [.] m

[PATCH v2 2/7] perf util: Add block_info in hist_entry

2019-06-02 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 fi

[PATCH v2 7/7] perf diff: Documentation -c cycles option

2019-06-02 Thread Jin Yao
Documentation the new computation selection 'cycles'. Signed-off-by: Jin Yao --- tools/perf/Documentation/perf-diff.txt | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt index da780

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

2019-06-02 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. v2: --- Move check_file_brs

[PATCH v2 5/7] perf diff: Link same basic blocks among different data files

2019-06-02 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 and resort

[PATCH V2 2/4] arm64/mm: Drop task_struct argument from __do_page_fault()

2019-06-02 Thread Anshuman Khandual
The task_struct argument is not getting used in __do_page_fault(). Hence just drop it and use current or cuurent->mm instead where ever required. This does not change any functionality. Signed-off-by: Anshuman Khandual Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: James Morse Cc: A

Re: [RFC 2/6] ipv4: add lockdep condition to fix for_each_entry

2019-06-02 Thread Pavel Machek
On Sun 2019-06-02 08:24:35, Joel Fernandes wrote: > On Sun, Jun 2, 2019 at 8:20 AM Joel Fernandes wrote: > > > > On Sun, Jun 2, 2019 at 3:00 AM Pavel Machek wrote: > > > > > > On Sat 2019-06-01 18:27:34, Joel Fernandes (Google) wrote: > > > > Signed-off-by: Joel Fernandes (Google) > > > > > > Th

[PATCH V2 3/4] arm64/mm: Consolidate page fault information capture

2019-06-02 Thread Anshuman Khandual
This consolidates page fault information capture and move them bit earlier. While here it also adds an wrapper is_el0_write_abort(). It also saves some cycles by replacing multiple user_mode() calls into a single one earlier during the fault. Signed-off-by: Anshuman Khandual Cc: Catalin Marinas

[PATCH V2 4/4] arm64/mm: Drop local variable vm_fault_t from __do_page_fault()

2019-06-02 Thread Anshuman Khandual
__do_page_fault() is over complicated with multiple goto statements. This cleans up the code flow and while there drops local variable vm_fault_t. Signed-off-by: Anshuman Khandual Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: James Morse Cc: Andrey Konovalov Cc: Christoph Hellwig

Re: rcu_read_lock lost its compiler barrier

2019-06-02 Thread Boqun Feng
On Mon, Jun 03, 2019 at 01:26:26PM +0800, Herbert Xu wrote: > On Sun, Jun 02, 2019 at 08:47:07PM -0700, Paul E. McKenney wrote: > > > > 1. These guarantees are of full memory barriers, -not- compiler > > barriers. > > What I'm saying is that wherever they are, they must come with > compiler

[PATCH V2 0/4] arm64/mm: Clean ups for do_page_fault()

2019-06-02 Thread Anshuman Khandual
This contains some clean ups for page fault handling in do_page_fault(). This has been boot tested on arm64 platform along with some stress test but just build tested on others. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: James Morse Cc: Andrey Konovalov Cc: Christoph Hellwig C

[PATCH V2 1/4] arm64/mm: Drop mmap_sem before calling __do_kernel_fault()

2019-06-02 Thread Anshuman Khandual
There is an inconsistency between down_read_trylock() success and failure paths while dealing with kernel access for non exception table areas where it calls __do_kernel_fault(). In case of failure it just bails out without holding mmap_sem but when it succeeds it does so while holding mmap_sem. Fi

linux-next: Tree for Jun 3

2019-06-02 Thread Stephen Rothwell
Hi all, Changes since 20190531: Reinstated tree: sh New tree: risc-v-fixes My fixes tree is empty again. The crypto tree gained a conflict against Linus' tree. The net-next tree lost its build failure. The clockevents tree gained a build failure for which I reverted a commit. The xarray tree

[PATCHv2 1/2] mm/gup: fix omission of check on FOLL_LONGTERM in get_user_pages_fast()

2019-06-02 Thread Pingfan Liu
As for FOLL_LONGTERM, it is checked in the slow path __gup_longterm_unlocked(). But it is not checked in the fast path, which means a possible leak of CMA page to longterm pinned requirement through this crack. Place a check in the fast path. Signed-off-by: Pingfan Liu Cc: Ira Weiny Cc: Andrew

[PATCHv2 2/2] mm/gup: rename nr as nr_pinned in get_user_pages_fast()

2019-06-02 Thread Pingfan Liu
To better reflect the held state of pages and make code self-explaining, rename nr as nr_pinned. Signed-off-by: Pingfan Liu Cc: Ira Weiny Cc: Andrew Morton Cc: Mike Rapoport Cc: Dan Williams Cc: Matthew Wilcox Cc: John Hubbard Cc: "Aneesh Kumar K.V" Cc: Keith Busch Cc: linux-kernel@vger.k

[PATCH v1 2/2] drm/komeda: Adds komeda_kms_drop_master

2019-06-02 Thread Lowry Li (Arm Technology China)
The komeda internal resources (pipelines) are shared between crtcs, and resources release by disable_crtc. This commit is working for once user forgot disabling crtc like app quit abnomally, and then the resources can not be used by another crtc. Adds drop_master to shutdown the device and make sur

[PATCH] ARC: build: Try to guess CROSS_COMPILE with cc-cross-prefix

2019-06-02 Thread Alexey Brodkin
For a long time we used to hard-code CROSS_COMPILE prefix for ARC until it started to cause problems, so we decided to solely rely on CROSS_COMPILE externally set by a user: commit 40660f1fcee8 ("ARC: build: Don't set CROSS_COMPILE in arch's Makefile"). While it works perfectly fine for build-syst

RE: [RFC PATCH 7/9] x86/sgx: Enforce noexec filesystem restriction for enclaves

2019-06-02 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Friday, May 31, 2019 4:32 PM > > Do not allow an enclave page to be mapped with PROT_EXEC if the source page > is backed by a > file on a noexec file system. > > Signed-off-by: Sean Christopherson > --- > arch/x86/kernel/cpu/sgx/driver/ioctl.c | 26 ++

RE: [RFC PATCH 6/9] x86/sgx: Require userspace to provide allowed prots to ADD_PAGES

2019-06-02 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Friday, May 31, 2019 4:32 PM > > ...to support (the equivalent) of existing Linux Security Module > functionality. > > Because SGX manually manages EPC memory, all enclave VMAs are backed by the > same vm_file, > i.e. /dev/sgx/enclave, so that SGX can impl

RE: [RFC PATCH 5/9] x86/sgx: Restrict mapping without an enclave page to PROT_NONE

2019-06-02 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Friday, May 31, 2019 4:32 PM > > To support LSM integration, SGX will require userspace to explicitly specify > the allowed > protections for each page. The allowed protections will be supplied to and > modified by > LSMs (based on their policies). > To pr

RE: [RFC PATCH 8/9] LSM: x86/sgx: Introduce ->enclave_load() hook for Intel SGX

2019-06-02 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Friday, May 31, 2019 4:32 PM > > diff --git a/include/linux/security.h b/include/linux/security.h index > 659071c2e57c..2f7925eeef7e 100644 > --- a/include/linux/security.h > +++ b/include/linux/security.h > @@ -392,6 +392,8 @@ void security_inode_invalidate_

RE: [RFC PATCH 4/9] mm: Introduce vm_ops->mprotect()

2019-06-02 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Friday, May 31, 2019 4:32 PM > > diff --git a/include/linux/mm.h b/include/linux/mm.h index > 0e8834ac32b7..50a42364a885 > 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -458,6 +458,8 @@ struct vm_operations_struct { > void (*close)(

RE: [RFC PATCH 3/9] x86/sgx: Allow userspace to add multiple pages in single ioctl()

2019-06-02 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Friday, May 31, 2019 4:32 PM > > +/** > + * sgx_ioc_enclave_add_pages - handler for %SGX_IOC_ENCLAVE_ADD_PAGES > + * > + * @filep: open file to /dev/sgx > + * @cmd: the command value > + * @arg: pointer to an &sgx_enclave_add_page instance > + * > +

Re: [PATCH v5] mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice

2019-06-02 Thread Lee Jones
On Fri, 31 May 2019, Gwendal Grignou wrote: > On Fri, May 31, 2019 at 1:13 AM Lee Jones wrote: > > > > On Thu, 30 May 2019, Gwendal Grignou wrote: > > > > > On Thu, May 30, 2019 at 12:48 AM Lee Jones wrote: > > > > > > > > On Wed, 29 May 2019, Gwendal Grignou wrote: > > > > > > > > > On Wed, May

Re: [PATCH 5/7] scsi: mac_scsi: Fix pseudo DMA implementation, take 2

2019-06-02 Thread Geert Uytterhoeven
Hi Finn, On Mon, Jun 3, 2019 at 1:32 AM Finn Thain wrote: > On Sun, 2 Jun 2019, Geert Uytterhoeven wrote: > > On Sun, Jun 2, 2019 at 3:29 AM Finn Thain > > wrote: > > > A system bus error during a PDMA transfer can mess up the calculation > > > of the transfer residual (the PDMA handshaking hard

linux-next: runtime failure of next-20190603

2019-06-02 Thread Stephen Rothwell
Hi all, My qemu powerpc_pseries_le_defconfig boots failed today with the following output at shutdown time: # halt # Stopping network...[ 32.109495] watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [ifdown:97] [ 32.109794] Modules linked in: [ 32.110367] CPU: 0 PID: 97 Comm: ifdown Not ta

Re: [PATCH 1/2] staging: rtl8188eu: remove redundant definition of ETH_ALEN

2019-06-02 Thread Michael Straube
On 2019-06-02 22:07, Joe Perches wrote: On Sun, 2019-06-02 at 18:35 +0200, Michael Straube wrote: ETH_ALEN is defined in linux/if_ether.h which is included by osdep_service.h, so remove the redundant definition from ieee80211.h. [] diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/

[PATCH v3 2/2] mt76: mt7615: fix slow performance when enable encryption

2019-06-02 Thread Ryder Lee
Fix wrong WCID assignment and add RKV (RX Key of this entry is valid) flag to check if peer uses the same configuration with previous handshaking. If the configuration is mismatch, WTBL indicates a “cipher mismatch” to stop SEC decryption to prevent the packet from damage. Suggested-by: YF Luo S

[PATCH v3 1/2] mt76: mt7615: enable support for mesh

2019-06-02 Thread Ryder Lee
Enable NL80211_IFTYPE_MESH_POINT and update its path. Signed-off-by: Ryder Lee --- Changes since v3 - fix a wrong expression Changes since v2 - remove unused definitions --- drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++ drivers/net/wireless/mediatek/mt76/mt7615/main.c | 1 + drive

RE: [External] Re: linux kernel page allocation failure and tuning of page cache

2019-06-02 Thread Nagal, Amit UTC CCS
-Original Message- From: Alexander Duyck [mailto:alexander.du...@gmail.com] Sent: Saturday, June 1, 2019 2:57 AM To: Nagal, Amit UTC CCS Cc: linux-kernel@vger.kernel.org; linux...@kvack.org; CHAWLA, RITU UTC CCS Subject: [External] Re: linux kernel page allocation failure and tuning of

Re: [PATCH 18/22] perf scripts python: exported-sql-viewer.py: Add IPC information to the Branch reports

2019-06-02 Thread Adrian Hunter
On 31/05/19 7:44 PM, Arnaldo Carvalho de Melo wrote: > Em Mon, May 20, 2019 at 02:37:24PM +0300, Adrian Hunter escreveu: >> Enhance the "All branches" and "Selected branches" reports to display IPC >> information if it is available. > > So, testing this I noticed that it all starts with the left a

RE: [External] Re: linux kernel page allocation failure and tuning of page cache

2019-06-02 Thread Nagal, Amit UTC CCS
-Original Message- From: Matthew Wilcox [mailto:wi...@infradead.org] Sent: Saturday, June 1, 2019 1:01 AM To: Nagal, Amit UTC CCS Cc: linux-kernel@vger.kernel.org; linux...@kvack.org; CHAWLA, RITU UTC CCS ; net...@vger.kernel.org Subject: [External] Re: linux kernel page allocation fa

[PATCH v1 2/4] mm: change PAGEREF_RECLAIM_CLEAN with PAGE_REFRECLAIM

2019-06-02 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. Moreov

[PATCH v1 3/4] mm: account nr_isolated_xxx in [isolate|putback]_lru_page

2019-06-02 Thread Minchan Kim
The isolate counting is pecpu counter so it would be not huge gain to work them by batch. Rather than complicating to make them batch, let's make it more stright-foward via adding the counting logic into [isolate|putback]_lru_page API. Link: http://lkml.kernel.org/r/20190531165927.ga20...@cmpxchg.

[PATCH v1 0/4] Introduce MADV_COLD and MADV_PAGEOUT

2019-06-02 Thread Minchan Kim
This patch is part of previous series: https://lore.kernel.org/lkml/20190531064313.193437-1-minc...@kernel.org/T/#u Originally, it was created for external madvise hinting feature. https://lkml.org/lkml/2019/5/31/463 Michal wanted to separte the discussion from external hinting interface so this p

[PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-02 Thread Minchan Kim
When a process expects no accesses to a certain memory range, it could give a hint to 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

[PATCH v1 4/4] mm: introduce MADV_PAGEOUT

2019-06-02 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 MADV_P

Re: [PATCH] regulator: bd70528: Drop unused include

2019-06-02 Thread Vaittinen, Matti
Thanks Linus! On Sat, 2019-06-01 at 01:06 +0200, Linus Walleij wrote: > This driver does not use any symbols from > so just drop the include. > > Cc: Matti Vaittinen > Signed-off-by: Linus Walleij Acked-By: Matti Vaittinen Br, Matti Vaittinen

Re: [PATCH] regulator: bd718x7: Drop unused include

2019-06-02 Thread Vaittinen, Matti
And thanks for this too =) On Sat, 2019-06-01 at 01:08 +0200, Linus Walleij wrote: > This driver does not use any symbols from > so just drop the include. > > Cc: Matti Vaittinen > Signed-off-by: Linus Walleij Acked-By: Matti Vaittinen Br, Matti Vaittinen

Re: rcu_read_lock lost its compiler barrier

2019-06-02 Thread Herbert Xu
On Sun, Jun 02, 2019 at 08:47:07PM -0700, Paul E. McKenney wrote: > > 1.These guarantees are of full memory barriers, -not- compiler > barriers. What I'm saying is that wherever they are, they must come with compiler barriers. I'm not aware of any synchronisation mechanism in the kerne

Re: [EXT] INFO: trying to register non-static key in del_timer_sync (2)

2019-06-02 Thread Dmitry Vyukov
On Sat, Jun 1, 2019 at 7:52 PM Ganapathi Bhat wrote: > > Hi syzbot, > > > > > syzbot found the following crash on: > > > As per the > link(https://syzkaller.appspot.com/bug?extid=dc4127f950da51639216), the issue > is fixed; Is it OK? Let us know if we need to do something? Hi Ganapathi, The "f

[GIT] Sparc

2019-06-02 Thread David Miller
Please pull to get these three bug fixes, and TLB flushing one is of particular brown paper bag quality... Thanks. The following changes since commit f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a: Linux 5.2-rc3 (2019-06-02 13:55:33 -0700) are available in the Git repository at: git://git.kern

Re: [PATCH] mdesc: fix a missing-check bug in get_vdev_port_node_info()

2019-06-02 Thread David Miller
From: Gen Zhang Date: Fri, 31 May 2019 09:24:18 +0800 > In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated > by kstrdup_const(), and it returns NULL when fails. So > 'node_info->vdev_port.name' should be checked. > > Signed-off-by: Gen Zhang Applied, thanks.

Re: [PATCH] sparc: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD

2019-06-02 Thread David Miller
From: Young Xiao <92siuy...@gmail.com> Date: Wed, 29 May 2019 10:21:48 +0800 > The PERF_EVENT_IOC_PERIOD ioctl command can be used to change the > sample period of a running perf_event. Consequently, when calculating > the next event period, the new period will only be considered after the > previ

Re: [PATCHv6 5/6] arm64: dts: lx2160a: Add PCIe controller DT nodes

2019-06-02 Thread Karthikeyan Mitran
Hi Hou Zhiqiang Two instances [@360 and @380] of the six has a different window count, the RC can not have more than 8 windows. apio-wins = <256>; //Can we change it to 8 ppio-wins = <24>;//Can we change it to 8 On Tue, May 28, 2019 at 12:20 PM Z.q. Hou wrote: > > From: Hou Zhiqia

Re: [PATCH v3 1/3] PCI: Introduce pcibios_ignore_alignment_request

2019-06-02 Thread Alexey Kardashevskiy
On 03/06/2019 12:23, Shawn Anastasio wrote: > > > On 5/30/19 10:56 PM, Alexey Kardashevskiy wrote: >> >> >> On 31/05/2019 08:49, Shawn Anastasio wrote: >>> On 5/29/19 10:39 PM, Alexey Kardashevskiy wrote: On 28/05/2019 17:39, Shawn Anastasio wrote: > > > On 5/28/19 1

linux-next: manual merge of the akpm-current tree with the dma-mapping tree

2019-06-02 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the akpm-current tree got a conflict in: include/linux/genalloc.h between commit: 3334e1dc5d71 ("lib/genalloc: add gen_pool_dma_zalloc() for zeroed DMA allocations") from the dma-mapping tree and commit: 1c6b703cba18 ("lib/genalloc: introduce chunk o

Re: [RFC] mm: Generalize notify_page_fault()

2019-06-02 Thread Anshuman Khandual
On 05/31/2019 11:18 PM, Matthew Wilcox wrote: > On Fri, May 31, 2019 at 02:17:43PM +0530, Anshuman Khandual wrote: >> On 05/30/2019 07:09 PM, Matthew Wilcox wrote: >>> On Thu, May 30, 2019 at 05:31:15PM +0530, Anshuman Khandual wrote: On 05/30/2019 04:36 PM, Matthew Wilcox wrote: > The

[PATCH] sched/fair: don't restart enqueued cfs quota slack timer

2019-06-02 Thread Liangyan
From: "liangyan.ply" start_cfs_slack_bandwidth() will restart the quota slack timer, if it is called frequently, this timer will be restarted continuously and may have no chance to expire to unthrottle cfs tasks. This will cause that the throttled tasks can't be unthrottled in time although they

Re: [PATCH] PCI: endpoint: Add DMA to Linux PCI EP Framework

2019-06-02 Thread Kishon Vijay Abraham I
Hi Alan, On 31/05/19 11:46 PM, Alan Mikhak wrote: > On Thu, May 30, 2019 at 10:08 PM Kishon Vijay Abraham I wrote: >> Hi Alan, >>> >>> Hi Kishon, >>> >>> I have some improvements in mind for a v2 patch in response to >>> feedback from Gustavo Pimentel that the current implementation is HW >>> spe

Re: [PATCH] PCI: endpoint: Add DMA to Linux PCI EP Framework

2019-06-02 Thread Vinod Koul
Hi Kishon, On 03-06-19, 09:54, Kishon Vijay Abraham I wrote: > right. For the endpoint case, drivers/pci/controller should register with the > dmaengine i.e if the controller has aN embedded DMA (I think it should be okay > to keep that in drivers/pci/controller itself instead of drivers/dma) and

[PATCH] cpu/hotplug: Abort disabling secondary CPUs if wakeup is pending

2019-06-02 Thread Pavankumar Kondeti
When "deep" suspend is enabled, all CPUs except the primary CPU are hotplugged out. Since CPU hotplug is a costly operation, check if we have to abort the suspend in between each CPU hotplug. This would improve the system suspend abort latency upon detecting a wakeup condition. Signed-off-by: Pava

Re: [PATCH] PCI: endpoint: Add DMA to Linux PCI EP Framework

2019-06-02 Thread Kishon Vijay Abraham I
Hi, On 31/05/19 1:19 PM, Arnd Bergmann wrote: > On Fri, May 31, 2019 at 8:32 AM Vinod Koul wrote: >> On 31-05-19, 10:50, Kishon Vijay Abraham I wrote: >>> On 31/05/19 10:37 AM, Vinod Koul wrote: On 30-05-19, 11:16, Kishon Vijay Abraham I wrote: > > right, my initial thought process w

[PATCH 12/15] dcache: Provide a dentry constructor

2019-06-02 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 +-

[PATCH 14/15] slub: Enable moving objects to/from specific nodes

2019-06-02 Thread Tobin C. Harding
We have just implemented Slab Movable Objects (SMO, 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_SLUB_SMO_NODE to guard this feature. CONFIG_SLUB_SM

[PATCH 15/15] slub: Enable balancing slabs across nodes

2019-06-02 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

[PATCH 10/15] xarray: Implement migration function for xa_node objects

2019-06-02 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 Ma

[PATCH 07/15] tools/testing/slab: Add object migration test module

2019-06-02 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 t

[PATCH 09/15] lib: Separate radix_tree_node and xa_node slab cache

2019-06-02 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 c

[PATCH 13/15] dcache: Implement partial shrink via Slab Movable Objects

2019-06-02 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 of

[PATCH 11/15] tools/testing/slab: Add XArray movable objects tests

2019-06-02 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 is

[PATCH 08/15] tools/testing/slab: Add object migration test suite

2019-06-02 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 $ /slub_de

[PATCH 06/15] tools/vm/slabinfo: Add defrag_used_ratio output

2019-06-02 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 +++ b/tools/vm/

[PATCH 05/15] tools/vm/slabinfo: Add remote node defrag ratio output

2019-06-02 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 +++ b/tools/vm/slabinf

[PATCH 01/15] slub: Add isolate() and migrate() methods

2019-06-02 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 SLAB

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

2019-06-02 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). Signed-off-by: Tobin C. Harding --- tools/vm/slabinfo.c | 40

[PATCH 03/15] slub: Sort slab cache list

2019-06-02 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. Signed-off-by: Tobin C. Harding --- mm/slab_common.c | 2 +- mm/slub.c

[PATCH 04/15] slub: Slab defrag core

2019-06-02 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 m

[PATCH 00/15] Slab Movable Objects (SMO)

2019-06-02 Thread Tobin C. Harding
Hi, TL;DR - Add object migration (SMO) to the SLUB allocator and implement object migration for the XArray and the dcache. Thanks for you patience with all the RFC's of this patch set. Here it is, ready for prime time. Internal fragmentation can occur within pages used by the slub allocator.

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

2019-06-02 Thread Tobin C. Harding
On Wed, May 29, 2019 at 04:16:51PM +, Roman Gushchin wrote: > On Wed, May 29, 2019 at 01:54:06PM +1000, Tobin C. Harding wrote: > > On Tue, May 21, 2019 at 02:05:38AM +, Roman Gushchin wrote: > > > On Tue, May 21, 2019 at 11:31:18AM +1000, Tobin C. Harding wrote: > > > > On Tue, May 21, 201

Re: [PATCH] PCI: endpoint: Add DMA to Linux PCI EP Framework

2019-06-02 Thread Kishon Vijay Abraham I
Hi Vinod, On 31/05/19 12:02 PM, Vinod Koul wrote: > On 31-05-19, 10:50, Kishon Vijay Abraham I wrote: >> Hi Vinod, >> >> On 31/05/19 10:37 AM, Vinod Koul wrote: >>> Hi Kishon, >>> >>> On 30-05-19, 11:16, Kishon Vijay Abraham I wrote: +Vinod Koul Hi, On 30/05/19 4:07 AM, Al

Re: [PATCH] sched/core: add __sched tag for io_schedule()

2019-06-02 Thread Gao Xiang
On 2019/5/31 22:37, Tejun Heo wrote: > On Fri, May 31, 2019 at 04:29:12PM +0800, Gao Xiang wrote: >> non-inline io_schedule() was introduced in >> commit 10ab56434f2f ("sched/core: Separate out io_schedule_prepare() and >> io_schedule_finish()") >> Keep in line with io_schedule_timeout, Otherwi

Re: [PATCH -next v2] mm/hotplug: fix a null-ptr-deref during NUMA boot

2019-06-02 Thread Pingfan Liu
On Fri, May 31, 2019 at 5:03 PM Michal Hocko wrote: > > On Thu 30-05-19 20:55:32, Pingfan Liu wrote: > > On Wed, May 29, 2019 at 2:20 AM Michal Hocko wrote: > > > > > > [Sorry for a late reply] > > > > > > On Thu 23-05-19 11:58:45, Pingfan Liu wrote: > > > > On Wed, May 22, 2019 at 7:16 PM Michal

Re: rcu_read_lock lost its compiler barrier

2019-06-02 Thread Herbert Xu
On Mon, Jun 03, 2019 at 12:01:14PM +0800, Herbert Xu wrote: > On Sun, Jun 02, 2019 at 08:47:07PM -0700, Paul E. McKenney wrote: > > > > CPU2: if (b != 1) > > CPU2: b = 1; > > Stop right there. The kernel is full of code that assumes that > assignment to an int/long

Re: [PATCH] mm/gup: fix omission of check on FOLL_LONGTERM in get_user_pages_fast()

2019-06-02 Thread Pingfan Liu
On Sat, Jun 1, 2019 at 1:06 AM John Hubbard wrote: > > On 5/31/19 4:05 AM, Pingfan Liu wrote: > > On Fri, May 31, 2019 at 7:21 AM John Hubbard wrote: > >> On 5/30/19 2:47 PM, Ira Weiny wrote: > >>> On Thu, May 30, 2019 at 06:54:04AM +0800, Pingfan Liu wrote: > >> [...] > >> Rather lightly tested.

Re: [PATCH] mm/gup: fix omission of check on FOLL_LONGTERM in get_user_pages_fast()

2019-06-02 Thread Pingfan Liu
On Sat, Jun 1, 2019 at 1:12 AM Ira Weiny wrote: > > On Fri, May 31, 2019 at 07:05:27PM +0800, Pingfan Liu wrote: > > On Fri, May 31, 2019 at 7:21 AM John Hubbard wrote: > > > > > > > > > Rather lightly tested...I've compile-tested with CONFIG_CMA and > > > !CONFIG_CMA, > > > and boot tested with

Re: rcu_read_lock lost its compiler barrier

2019-06-02 Thread Herbert Xu
On Sun, Jun 02, 2019 at 08:47:07PM -0700, Paul E. McKenney wrote: > > CPU2: if (b != 1) > CPU2: b = 1; Stop right there. The kernel is full of code that assumes that assignment to an int/long is atomic. If your compiler breaks this assumption that we can kiss

[PATCH 1/2] dt-bindings: i3c: Document MediaTek I3C master bindings

2019-06-02 Thread Qii Wang
Document MediaTek I3C master DT bindings. Signed-off-by: Qii Wang --- .../devicetree/bindings/i3c/mtk,i3c-master.txt | 50 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/mtk,i3c-master.txt diff --git a/Documentation/devicetr

[PATCH 2/2] i3c: master: Add driver for MediaTek IP

2019-06-02 Thread Qii Wang
Add a driver for MediaTek I3C master IP. Signed-off-by: Qii Wang --- drivers/i3c/master/Kconfig | 10 + drivers/i3c/master/Makefile |1 + drivers/i3c/master/i3c-master-mtk.c | 1246 +++ 3 files changed, 1257 insertions(+) create mode 100644

[PATCH 0/2] Add MediaTek I3C master controller driver

2019-06-02 Thread Qii Wang
This series are based on 5.2-rc1, we provide two patches to support MediaTek I3C master controller. Qii Wang (2): dt-bindings: i3c: Document MediaTek I3C master bindings i3c: master: Add driver for MediaTek IP .../devicetree/bindings/i3c/mtk,i3c-master.txt | 50 + drivers/i3c/master/Kc

Re: rcu_read_lock lost its compiler barrier

2019-06-02 Thread Paul E. McKenney
On Mon, Jun 03, 2019 at 10:46:40AM +0800, Herbert Xu wrote: > On Sun, Jun 02, 2019 at 01:54:12PM -0700, Linus Torvalds wrote: > > On Sat, Jun 1, 2019 at 10:56 PM Herbert Xu > > wrote: > > > > > > You can't then go and decide to remove the compiler barrier! To do > > > that you'd need to audit ev

[PATCH v10 4/7] rpmsg: add rpmsg support for mt8183 SCP.

2019-06-02 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- Changes from v9, v8, v7: - No change. Changes from v6: - Decouple mtk_rpmsg from mtk_scp by putting all necessary informations (name service IPI id, register/unregister/send functions) in

[PATCH v10 6/7] mfd: cros_ec: differentiate SCP from EC by feature bit.

2019-06-02 Thread Pi-Hsun Shih
System Companion Processor (SCP) is Cortex M4 co-processor on some MediaTek platform that can run EC-style firmware. Since a SCP and EC would both exist on a system, and use the cros_ec_dev driver, we need to differentiate between them for the userspace, or they would both be registered at /dev/cro

[PATCH v10 7/7] arm64: dts: mt8183: add scp node

2019-06-02 Thread Pi-Hsun Shih
From: Eddie Huang Add scp node to mt8183 and mt8183-evb Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih Signed-off-by: Eddie Huang --- Changes from v9: - Remove extra reserve-memory-vpu_share node. Changes from v8: - New patch. --- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 11 +

[PATCH v10 3/7] remoteproc: mt8183: add reserved memory manager API

2019-06-02 Thread Pi-Hsun Shih
From: Erin Lo Add memory table mapping API for other driver to lookup reserved physical and virtual memory Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih --- Changes from v9: - No change. Changes from v8: - Add more reserved regions for camera ISP. Changes from v7, v6, v5: - No change

[PATCH v10 5/7] dt-bindings: Add binding for cros-ec-rpmsg.

2019-06-02 Thread Pi-Hsun Shih
Add a DT binding documentation for ChromeOS EC driver over rpmsg. Signed-off-by: Pi-Hsun Shih Acked-by: Rob Herring --- Changes from v9, v8, v7, v6: - No change. Changes from v5: - New patch. --- Documentation/devicetree/bindings/mfd/cros-ec.txt | 5 - 1 file changed, 4 insertions(+), 1

  1   2   3   4   >