[PATCH v6 17/17] x86/perf, static_call: Optimize x86_pmu methods

2020-07-10 Thread Peter Zijlstra
Replace many of the indirect calls with static_call(). The average PMI time, as measured by perf_sample_event_took()*: PRE:3283.03 [ns] POST: 3145.12 [ns] Which is a ~138 [ns] win per PMI, or a ~4.2% decrease. [*] on an IVB-EP, using: 'perf record -a -e cycles -- make O=defconfig-build/

Re: [RFC v2 0/4] futex2: Add new futex interface

2020-07-10 Thread André Almeida
Hi On 7/10/20 10:23 AM, Oleksandr Natalenko wrote: > Hello. > > On 09.07.2020 19:59, André Almeida wrote: >> This RFC is a followup to the previous discussion initiated from my last >> patch "futex: Implement mechanism to wait on any of several futexes"[1]. >> As stated in the thread, the correct

[PATCH v6 03/17] module: Properly propagate MODULE_STATE_COMING failure

2020-07-10 Thread Peter Zijlstra
Now that notifiers got unbroken; use the proper interface to handle notifier errors and propagate them. There were already MODULE_STATE_COMING notifiers that failed; notably: - jump_label_module_notifier() - tracepoint_module_notify() - bpf_event_notify() By propagating this error, we fix tho

Re: [PATCH v3 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-10 Thread Piotr Oniszczuk
> Wiadomość napisana przez Clément Péron w dniu > 09.07.2020, o godz. 16:03: > > Add an Operating Performance Points table for the GPU to > enable Dynamic Voltage & Frequency Scaling on the H6. > > The voltage range is set with minival voltage set to the target > and the maximal voltage set

Re: [PATCH v2 4/6] devres: handle zero size in devm_kmalloc()

2020-07-10 Thread Jon Hunter
Hi Bartosz, On 29/06/2020 07:50, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Make devm_kmalloc() behave similarly to non-managed kmalloc(): return > ZERO_SIZE_PTR when requested size is 0. Update devm_kfree() to handle > this case. > > Signed-off-by: Bartosz Golaszewski > --- >

[PATCH v6 07/17] static_call: Add inline static call infrastructure

2020-07-10 Thread Peter Zijlstra
From: Josh Poimboeuf Add infrastructure for an arch-specific CONFIG_HAVE_STATIC_CALL_INLINE option, which is a faster version of CONFIG_HAVE_STATIC_CALL. At runtime, the static call sites are patched directly, rather than using the out-of-line trampolines. Compared to out-of-line static calls,

[PATCH v6 05/17] compiler.h: Make __ADDRESSABLE() symbol truly unique

2020-07-10 Thread Peter Zijlstra
From: Josh Poimboeuf The __ADDRESSABLE() macro uses the __LINE__ macro to create a temporary symbol which has a unique name. However, if the macro is used multiple times from within another macro, the line number will always be the same, resulting in duplicate symbols. Make the temporary symbol

[PATCH v6 02/17] module: Fix up module_notifier return values

2020-07-10 Thread Peter Zijlstra
While auditing all module notifiers I noticed a whole bunch of fail wrt the return value. Notifiers have a 'special' return semantics. As is; NOTIFY_DONE vs NOTIFY_OK is a bit vague; but notifier_from_errno(0) results in NOTIFY_OK and NOTIFY_DONE has a comment that says "Don't care". >From this I

[PATCH v6 13/17] static_call: Add static_call_cond()

2020-07-10 Thread Peter Zijlstra
Extend the static_call infrastructure to optimize the following common pattern: if (func_ptr) func_ptr(args...) For the trampoline (which is in effect a tail-call), we patch the JMP.d32 into a RET, which then directly consumes the trampoline call. For the in-line sites we

[PATCH v6 08/17] static_call: Avoid kprobes on inline static_call()s

2020-07-10 Thread Peter Zijlstra
Similar to how we disallow kprobes on any other dynamic text (ftrace/jump_label) also disallow kprobes on inline static_call()s. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kernel/kprobes/opt.c |4 +- include/linux/static_call.h | 11 +++ kernel/kprobes.c |2 +

Re: [PATCH v7 7/7] arm64: dts: add dts nodes for MT6779

2020-07-10 Thread Matthias Brugger
On 02/07/2020 14:57, Hanks Chen wrote: this adds initial MT6779 dts settings for board support, including cpu, gic, timer, ccf, pinctrl, uart, sysirq...etc. Signed-off-by: Hanks Chen --- arch/arm64/boot/dts/mediatek/Makefile |1 + arch/arm64/boot/dts/mediatek/mt6779-evb.dts |

Re: [PATCH 3/3] ARM: dts: colibri-imx7: add usb dual-role switch capability

2020-07-10 Thread Oleksandr Suvorov
On Fri, Jul 10, 2020 at 4:26 PM Philippe Schenker wrote: > > Since the runtime-pm wakeup bug was fixed in > drivers/usb/chipidea/core.c usb dual-role host/device switching is > working. So make use of it. > > Signed-off-by: Philippe Schenker Reviewed-by: Oleksandr Suvorov > > --- > > arch/arm

[GIT PULL] more s390 updates for 5.8-rc5

2020-07-10 Thread Heiko Carstens
Hi Linus, please pull more small s390 updates for 5.8-rc5. This request is mainly due to the fact that Gerald Schaefer's and also my old email addresses currently do not work any longer. Therefore we decided to switch to new email addresses and reflect that in the MAINTAINERS file. Thanks, Heiko

Re: [PATCH net-next v1 2/5] net: phy: micrel: apply resume errata workaround for ksz8873 and ksz8863

2020-07-10 Thread Andrew Lunn
On Fri, Jul 10, 2020 at 02:08:48PM +0200, Oleksij Rempel wrote: > The ksz8873 and ksz8863 switches are affected by following errata: This should really be a patch on its own, aimed at net, so it gets back ported to stable. Andrew

Re: [PATCH v3 4/4] io_uring: add support for zone-append

2020-07-10 Thread Matthew Wilcox
On Fri, Jul 10, 2020 at 02:10:54PM +0100, Christoph Hellwig wrote: > On Fri, Jul 10, 2020 at 12:35:43AM +0530, Kanchan Joshi wrote: > > Append required special treatment (conversion for sector to bytes) for > > io_uring. > > And we were planning a user-space wrapper to abstract that. > > > > But

Re: [PATCH v3 4/4] io_uring: add support for zone-append

2020-07-10 Thread Christoph Hellwig
On Fri, Jul 10, 2020 at 02:48:24PM +0100, Matthew Wilcox wrote: > If we're going to go the route of changing the CQE, how about: > > struct io_uring_cqe { > __u64 user_data; /* sqe->data submission passed back */ > -__s32 res;/* result code for this event */

Re: [PATCH v6 07/10] iommu/mediatek: Add REG_MMU_WR_LEN_CTRL register definition

2020-07-10 Thread Matthias Brugger
On 03/07/2020 06:41, Chao Hao wrote: Some platforms(ex: mt6779) need to improve performance by setting REG_MMU_WR_LEN_CTRL register. And we can use WR_THROT_EN macro to control whether we need to set the register. If the register uses default value, iommu will send command to EMI without restr

Re: [PATCH 1/2] memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold

2020-07-10 Thread Bartlomiej Zolnierkiewicz
On 7/10/20 2:56 PM, Lukasz Luba wrote: > > > On 7/10/20 1:45 PM, Krzysztof Kozlowski wrote: >> On Fri, Jul 10, 2020 at 09:34:45AM +0100, Lukasz Luba wrote: >>> Hi Chanwoo, >>> >>> On 7/9/20 5:08 AM, Chanwoo Choi wrote: Hi Lukasz, On 7/9/20 12:34 AM, Lukasz Luba wrote: > In or

Re: [PATCH v3] vmalloc: Add the right hint when vmalloc failed

2020-07-10 Thread Uladzislau Rezki
> On Fri, Jul 10, 2020 at 08:17:52PM +0800, Tian Tao wrote: > > In fact "vmalloc=" cmdline option is not available on many > > platforms.When the user encounters this error, add the correct > > hint to prevent misleading. > > i don't think this is an improvement. > Matthew, maybe it should not be

Re: [PATCH net-next v1 3/5] net: phy: micrel: ksz886x add MDI-X support

2020-07-10 Thread Andrew Lunn
On Fri, Jul 10, 2020 at 02:08:49PM +0200, Oleksij Rempel wrote: > Add support for MDI-X status and configuration > > Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 6/6] riscv: Add KPROBES_ON_FTRACE supported

2020-07-10 Thread Masami Hiramatsu
Hi Guo, On Thu, 9 Jul 2020 02:19:14 + guo...@kernel.org wrote: > +/* Ftrace callback handler for kprobes -- called under preepmt disabed */ > +void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, > +struct ftrace_ops *ops, struct pt_regs *regs) > +{ >

Re: [PATCH net-next v1 4/5] net: phy: micrel: ksz8081 add MDI-X support

2020-07-10 Thread Andrew Lunn
On Fri, Jul 10, 2020 at 02:08:50PM +0200, Oleksij Rempel wrote: > Add support for MDI-X status and configuration > > Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v3 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-10 Thread Clément Péron
Hi, On Fri, 10 Jul 2020 at 15:45, Piotr Oniszczuk wrote: > > > > > Wiadomość napisana przez Clément Péron w dniu > > 09.07.2020, o godz. 16:03: > > > > Add an Operating Performance Points table for the GPU to > > enable Dynamic Voltage & Frequency Scaling on the H6. > > > > The voltage range is

Re: [PATCH v3 4/4] io_uring: add support for zone-append

2020-07-10 Thread Matthew Wilcox
On Fri, Jul 10, 2020 at 02:49:32PM +0100, Christoph Hellwig wrote: > On Fri, Jul 10, 2020 at 02:48:24PM +0100, Matthew Wilcox wrote: > > If we're going to go the route of changing the CQE, how about: > > > > struct io_uring_cqe { > > __u64 user_data; /* sqe->data submission passed

Re: [PATCH] io_uring: fix memleak in io_sqe_files_register()

2020-07-10 Thread Jens Axboe
On 7/10/20 8:14 AM, Yang Yingliang wrote: > I got a memleak report when doing some fuzz test: > > BUG: memory leak > unreferenced object 0x607eeac06e78 (size 8): > comm "test", pid 295, jiffies 4294735835 (age 31.745s) > hex dump (first 8 bytes): > 00 00 00 00 00 00 00 00

[RFC PATCH 4/4] thermal: Modify thermal governors to do nothing for "cold" trip points

2020-07-10 Thread Thara Gopinath
For now, thermal governors do not support monitoring of falling temperature. Hence, in case of calls to the governor for trip points marked as cold, return doing nothing. Signed-off-by: Thara Gopinath --- drivers/thermal/gov_bang_bang.c | 8 drivers/thermal/gov_fair_share.c |

[RFC PATCH 3/4] thermal:core:Add genetlink notifications for monitoring falling temperature

2020-07-10 Thread Thara Gopinath
Add notification calls for trip type THERMAL_TRIP_COLD when temperature crosses the trip point in either direction. Signed-off-by: Thara Gopinath --- drivers/thermal/thermal_core.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/thermal_

[RFC PATCH 0/4] thermal: Introduce support for monitoring falling temperature

2020-07-10 Thread Thara Gopinath
Thermal framework today supports monitoring for rising temperatures and subsequently initiating cooling action in case of a thermal trip point being crossed. There are scenarios where a SoC need some warming action to be activated if the temperature falls below a cetain permissible limit. Since war

[RFC PATCH 1/4] dt-bindings:thermal:Add cold trip point type

2020-07-10 Thread Thara Gopinath
Extend thermal trip point type property to include "cold" trip type indicating point in the temperature domain below which a warming action must be intiated. Signed-off-by: Thara Gopinath --- Documentation/devicetree/bindings/thermal/thermal.txt | 1 + 1 file changed, 1 insertion(+) diff --git

[RFC PATCH 2/4] thermal: Add support for cold trip point

2020-07-10 Thread Thara Gopinath
Add new trip type indicating cold THERMAL_TRIP_COLD Signed-off-by: Thara Gopinath --- drivers/thermal/thermal_of.c | 1 + include/uapi/linux/thermal.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 69ef12f852b7..b4e564a422f

Re: [PATCH v3] vmalloc: Add the right hint when vmalloc failed

2020-07-10 Thread Matthew Wilcox
On Fri, Jul 10, 2020 at 03:49:56PM +0200, Uladzislau Rezki wrote: > > On Fri, Jul 10, 2020 at 08:17:52PM +0800, Tian Tao wrote: > > > In fact "vmalloc=" cmdline option is not available on many > > > platforms.When the user encounters this error, add the correct > > > hint to prevent misleading. > >

[PATCH 6/6] exec: use force_uaccess_begin during exec and exit

2020-07-10 Thread Christoph Hellwig
Both exec and exit want to ensure that the uaccess routines actually do access user pointers. Use the newly added force_uaccess_begin helper instead of an open coded set_fs for that to prepare for kernel builds where set_fs() does not exist. Signed-off-by: Christoph Hellwig --- fs/exec.c |

[PATCH 4/6] uaccess: remove segment_eq

2020-07-10 Thread Christoph Hellwig
segment_eq is only used to implement uaccess_kernel. Just open code uaccess_kernel in the arch uaccess headers and remove one layer of indirection. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/uaccess.h | 2 +- arch/arc/include/asm/segment.h| 3 +-- arch/arm/include/

[PATCH 1/6] syscalls: use uaccess_kernel in addr_limit_user_check

2020-07-10 Thread Christoph Hellwig
Use the uaccess_kernel helper instead of duplicating it. Signed-off-by: Christoph Hellwig --- include/linux/syscalls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index b951a87da9877c..e933a43d4a69ac 100644 --- a/include

[PATCH 3/6] riscv: include in

2020-07-10 Thread Christoph Hellwig
To ensure TASK_SIZE is defined for USER_DS. Signed-off-by: Christoph Hellwig --- arch/riscv/include/asm/uaccess.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h index 8ce9d607b53dce..22de922d6ecb2f 100644 --- a/arch/riscv

clean up address limit helpers

2020-07-10 Thread Christoph Hellwig
Hi all, in preparation for eventually phasing out direct use of set_fs(), this series removes the segment_eq() arch helper that is only used to implement or duplicate the uaccess_kernel() API, and then adds descriptive helpers to force the kernel address limit. Diffstat: arch/alpha/include/asm/u

Re: [PATCH v5 1/2] dt-bindings: timer: Add Ingenic X1000 OST bindings.

2020-07-10 Thread Zhou Yanjie
Hi Rob, 在 2020/7/10 上午6:49, Rob Herring 写道: On Sun, Jul 05, 2020 at 10:03:52PM +0800, 周琰杰 (Zhou Yanjie) wrote: Add the OST bindings for the X1 SoC from Ingenic. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil --- Notes: v1->v2: No change

[PATCH 5/6] uaccess: add force_uaccess_{begin,end} helpers

2020-07-10 Thread Christoph Hellwig
Add helpers to wraper the get_fs/set_fs magic for undoing any damange done by set_fs(KERNEL_DS). There is no real functional benefit, but this documents the intent of these calls better, and will allow stubbing the functions out easily for kernels builds that do not allow address space overrides i

[PATCH 2/6] nds32: use uaccess_kernel in show_regs

2020-07-10 Thread Christoph Hellwig
Use the uaccess_kernel helper instead of duplicating it. Signed-off-by: Christoph Hellwig --- arch/nds32/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nds32/kernel/process.c b/arch/nds32/kernel/process.c index 9712fd474f2ca3..f06265949ec28b 100644 ---

Re: [PATCH v2 4/4] perf-probe: Warn if the target function is GNU Indirect function

2020-07-10 Thread Srikar Dronamraju
* Masami Hiramatsu [2020-07-10 22:11:33]: > Warn if the probe target function is GNU indirect function (GNU_IFUNC) > because it may not what the user want to probe. > > The GNU indirect function ( https://sourceware.org/glibc/wiki/GNU_IFUNC ) > is the dynamic solved symbol at runtime. IFUNC func

Re: [PATCH v3 4/4] io_uring: add support for zone-append

2020-07-10 Thread Kanchan Joshi
On Fri, Jul 10, 2020 at 6:59 PM Kanchan Joshi wrote: > > On Fri, Jul 10, 2020 at 6:39 PM Christoph Hellwig wrote: > > > > On Thu, Jul 09, 2020 at 12:50:27PM -0600, Jens Axboe wrote: > > > It might, if you have IRQ context for the completion. task_work isn't > > > expensive, however. It's not like

[v5] dt-bindings: msm: disp: add yaml schemas for DPU and DSI bindings

2020-07-10 Thread Krishna Manikandan
MSM Mobile Display Subsytem (MDSS) encapsulates sub-blocks like DPU display controller, DSI etc. Add YAML schema for the device tree bindings for the same. Signed-off-by: Krishna Manikandan Changes in v2: - Changed dpu to DPU (Sam Ravnborg) - Fixed indentation issues (Sam Ravnbor

Re: [PATCH] Revert "thermal: mediatek: fix register index error"

2020-07-10 Thread Matthias Brugger
On 07/07/2020 12:34, Enric Balletbo i Serra wrote: This reverts commit eb9aecd90d1a39601e91cd08b90d5fee51d321a6 The above patch is supposed to fix a register index error on mt2701. It is not clear if the problem solved is a hang or just an invalid value returned, my guess is the second. The p

Re: [PATCH v1 0/9] s390: implement and optimize vmemmap_free()

2020-07-10 Thread Heiko Carstens
On Wed, Jul 08, 2020 at 02:16:39PM +0200, David Hildenbrand wrote: > >>> Hmm.. I really would like to see if there would be only a single page > >>> table walker left in vmem.c, which handles both adding and removing > >>> things. > >>> Now we end up with two different page table walk implementatio

Re: [PATCH] blk-mq: Remove unnecessary local variable

2020-07-10 Thread Jens Axboe
On 7/4/20 1:26 AM, Baolin Wang wrote: > Remove unnecessary local variable 'ret' in blk_mq_dispatch_hctx_list(). Applied, thanks. -- Jens Axboe

Re: [PATCH] blk-mq: Remove unnecessary validation before calling blk_mq_sched_completed_request()

2020-07-10 Thread Jens Axboe
On 7/4/20 1:28 AM, Baolin Wang wrote: > We've already validated the 'q->elevator' before calling > ->ops.completed_request() > in blk_mq_sched_completed_request(), thus no need to validate > rq->internal_tag again, > and remove it. Applied, but I reformatted and edited your commit message. --

Re: [PATCH 1/2] memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold

2020-07-10 Thread Lukasz Luba
On 7/10/20 2:49 PM, Bartlomiej Zolnierkiewicz wrote: On 7/10/20 2:56 PM, Lukasz Luba wrote: On 7/10/20 1:45 PM, Krzysztof Kozlowski wrote: On Fri, Jul 10, 2020 at 09:34:45AM +0100, Lukasz Luba wrote: Hi Chanwoo, On 7/9/20 5:08 AM, Chanwoo Choi wrote: Hi Lukasz, On 7/9/20 12:34 AM, Luk

Re: KASAN: use-after-free Read in line6_submit_audio_in_all_urbs

2020-07-10 Thread Takashi Iwai
On Fri, 26 Jun 2020 20:26:05 +0200, Alan Stern wrote: > > On Fri, Jun 26, 2020 at 10:18:12AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:fb574682 usbip: tools: fix module name in man page > > git tree: > > https://git.kernel.org/pub

Re: [PATCH v4 0/2] Fix and enable pmem as RAM device on arm64

2020-07-10 Thread Dan Williams
On Thu, Jul 9, 2020 at 8:17 PM Jia He wrote: > > This fixies a few issues when I tried to enable pmem as RAM device on arm64. > > To use memory_add_physaddr_to_nid as a fallback nid, it would be better > implement a general version (__weak) in mm/memory_hotplug. After that, arm64/ > sh/s390 can si

[PATCH 2/2] serial: tegra: drop bogus NULL tty-port checks

2020-07-10 Thread Johan Hovold
The struct tty_port is part of the uart state and will never be NULL in the receive helpers. Drop the bogus NULL checks and rename the pointer-variables "port" to differentiate them from struct tty_struct pointers (which can be NULL). Fixes: 962963e4ee23 ("serial: tegra: Switch to using struct tty

[PATCH 1/2] serial: tegra: fix CREAD handling for PIO

2020-07-10 Thread Johan Hovold
Commit 33ae787b74fc ("serial: tegra: add support to ignore read") added support for dropping input in case CREAD isn't set, but for PIO the ignore_status_mask wasn't checked until after the character had been put in the receive buffer. Note that the NULL tty-port test is bogus and will be removed

[PATCH 0/2] serial: tegra: fix CREAD handling for PIO

2020-07-10 Thread Johan Hovold
Stumbled over these two; compile-tested only. Johan Johan Hovold (2): serial: tegra: fix CREAD handling for PIO serial: tegra: drop bogus NULL tty-port checks drivers/tty/serial/serial-tegra.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) -- 2.26.2

ERROR: "max_low_pfn" undefined!

2020-07-10 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 42f82040ee66db13525dc6f14b8559890b2f4c1c commit: ec3e5c0f0c2b716e768c0eee0fec30d572939ef5 drm/amdgpu: make pmu support optional, again date: 9 months ago config: ia64-randconfig-r003-20200710 (attached as

[PATCH v6 2/4] mm/util.c: make vm_memory_committed() more accurate

2020-07-10 Thread Feng Tang
percpu_counter_sum_positive() will provide more accurate info. As with percpu_counter_read_positive(), in worst case the deviation could be 'batch * nr_cpus', which is totalram_pages/256 for now, and will be more when the batch gets enlarged. Its time cost is about 800 nanoseconds on a 2C/4T plat

[PATCH v6 0/4] make vm_committed_as_batch aware of vm overcommit policy

2020-07-10 Thread Feng Tang
When checking a performance change for will-it-scale scalability mmap test [1], we found very high lock contention for spinlock of percpu counter 'vm_committed_as': 94.14% 0.35% [kernel.kallsyms] [k] _raw_spin_lock_irqsave 48.21% _raw_spin_lock_irqsave;percpu_counter_add_batc

[PATCH v6 1/4] proc/meminfo: avoid open coded reading of vm_committed_as

2020-07-10 Thread Feng Tang
Use the existing vm_memory_committed() instead, which is also convenient for future change. Signed-off-by: Feng Tang Acked-by: Michal Hocko Cc: Matthew Wilcox (Oracle) Cc: Johannes Weiner Cc: Mel Gorman Cc: Qian Cai Cc: Kees Cook Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Huang Ying

[PATCH v6 4/4] mm: adjust vm_committed_as_batch according to vm overcommit policy

2020-07-10 Thread Feng Tang
When checking a performance change for will-it-scale scalability mmap test [1], we found very high lock contention for spinlock of percpu counter 'vm_committed_as': 94.14% 0.35% [kernel.kallsyms] [k] _raw_spin_lock_irqsave 48.21% _raw_spin_lock_irqsave;percpu_counter_add_batc

[PATCH v6 3/4] percpu_counter: add percpu_counter_sync()

2020-07-10 Thread Feng Tang
percpu_counter's accuracy is related to its batch size. For a percpu_counter with a big batch, its deviation could be big, so when the counter's batch is runtime changed to a smaller value for better accuracy, there could also be requirment to reduce the big deviation. So add a percpu-counter sync

Re: [PATCH v1 0/9] s390: implement and optimize vmemmap_free()

2020-07-10 Thread David Hildenbrand
On 10.07.20 15:57, Heiko Carstens wrote: > On Wed, Jul 08, 2020 at 02:16:39PM +0200, David Hildenbrand wrote: > Hmm.. I really would like to see if there would be only a single page > table walker left in vmem.c, which handles both adding and removing > things. > Now we end up with

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-10 Thread Mathieu Desnoyers
- On Jul 9, 2020, at 9:56 PM, Nicholas Piggin npig...@gmail.com wrote: > And get rid of the generic sync_core_before_usermode facility. > > This helper is the wrong way around I think. The idea that membarrier > state requires a core sync before returning to user is the easy one > that does n

Re: [PATCH 02/10] mfd: mfd-core: Complete kerneldoc header for devm_mfd_add_devices()

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228, v4.4.228. v5.7.6: Build OK! v5.4.4

Re: [PATCH 09/10] mfd: atmel-smc: Add missing colon(s) for 'conf' arguments

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228, v4.4.228. v5.7.6: Build OK! v5.4.4

Re: [PATCH v2 07/17] irqchip/gic: Atomically update affinity

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: 04c8b0f82c7d ("irqchip/gic: Make locking a BL_SWITCHER only feature"). The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228. v5.7.6: Build OK! v5

Re: [PATCH v3 1/3] mm/shuffle: don't move pages between zones and don't read garbage memmaps

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: e900a918b098 ("mm: shuffle initial free memory to improve memory-side-cache utilization"). The bot has tested the following trees: v5.7.6, v5.4.49. v5.7.6: Build OK! v5.4.49: Failed

Re: [PATCH 10/10] mfd: altera-sysmgr: Supply descriptions for 'np' and 'property' function args

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228, v4.4.228. v5.7.6: Build OK! v5.4.4

Re: [PATCH 04/10] mfd: altera-sysmgr: Fix physical address storing hacks

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.7.6, v5.4.49, v4.19.130, v4.14.186, v4.9.228, v4.4.228. v5.7.6: Build OK! v5.4.4

Re: [PATCH 4/4] intel_th: Fix a NULL dereference when hub driver is not loaded

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: 39f4034693b7 ("intel_th: Add driver infrastructure for Intel(R) Trace Hub devices"). The bot has tested the following trees: v5.7.7, v5.4.50, v4.19.131, v4.14.187, v4.9.229, v4.4.22

Re: [PATCH v2] mm, oom: make the calculation of oom badness more accurate

2020-07-10 Thread Yafang Shao
On Fri, Jul 10, 2020 at 9:07 PM Michal Hocko wrote: > > On Fri 10-07-20 14:58:54, Michal Hocko wrote: > [...] > > I will have a closer look. Is the full dmesg available somewhere? > > Ups, I have missed this: > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index 2dd5a90f2f81..7f01835862f4 100644 >

Re: [PATCH v3] vmalloc: Add the right hint when vmalloc failed

2020-07-10 Thread Uladzislau Rezki
On Fri, Jul 10, 2020 at 02:53:01PM +0100, Matthew Wilcox wrote: > On Fri, Jul 10, 2020 at 03:49:56PM +0200, Uladzislau Rezki wrote: > > > On Fri, Jul 10, 2020 at 08:17:52PM +0800, Tian Tao wrote: > > > > In fact "vmalloc=" cmdline option is not available on many > > > > platforms.When the user enco

Re: [PATCH 1/4] mfd: mt6360: Refactor and fix code style

2020-07-10 Thread Matthias Brugger
On 07/07/2020 12:30, Gene Chen wrote: From: Gene Chen Rearrange include file. Remove brackets around raw numbers. Indicate sub-dev compatible name by using "-" Combine mt6360 pmic/ldo resouces into mt6360 regulator resources. Rename mt6360_pmu_data by mt6360_data. Rename mt6360_pmu by mt6360

Re: [tip: perf/core] x86/cpufeatures: Add Architectural LBRs feature bit

2020-07-10 Thread Liang, Kan
On 7/9/2020 7:00 PM, Dave Hansen wrote: On 7/8/20 2:51 AM, tip-bot2 for Kan Liang wrote: diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 02dabc9..72ba4c5 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -36

Re: [PATCH v3 4/4] io_uring: add support for zone-append

2020-07-10 Thread Jens Axboe
On 7/10/20 7:10 AM, Christoph Hellwig wrote: > On Fri, Jul 10, 2020 at 12:35:43AM +0530, Kanchan Joshi wrote: >> Append required special treatment (conversion for sector to bytes) for >> io_uring. >> And we were planning a user-space wrapper to abstract that. >> >> But good part (as it seems now)

Re: [PATCH 4/5] kprobes: Do not expose probe addresses to non-CAP_SYSLOG

2020-07-10 Thread Masami Hiramatsu
On Thu, 2 Jul 2020 16:26:37 -0700 Kees Cook wrote: > The kprobe show() functions were using "current"'s creds instead > of the file opener's creds for kallsyms visibility. Fix to use > seq_file->file->f_cred. This looks good to me. Acked-by: Masami Hiramatsu Thanks! > > Cc: sta...@vger.ker

[PATCH] dma-pool: Only allocate from CMA when in same memory zone

2020-07-10 Thread Nicolas Saenz Julienne
There is no guarantee to CMA's placement, so allocating a zone specific atomic pool from CMA might return memory from a completely different memory zone. To get around this double check CMA's placement before allocating from it. Fixes: c84dc6e68a1d ("dma-pool: add additional coherent pools to map

Re: [PATCH v14 07/20] mm/thp: narrow lru locking

2020-07-10 Thread Alex Shi
在 2020/7/10 下午7:28, Kirill A. Shutemov 写道: >> * hugetlb_fault_mutex (hugetlbfs specific page fault mutex) >> * anon_vma->rwsem >> * mm->page_table_lock or pte_lock >> - * pgdat->lru_lock (in mark_page_accessed, isolate_lru_page) >> *

Re: [PATCH v3 4/4] io_uring: add support for zone-append

2020-07-10 Thread Kanchan Joshi
On Fri, Jul 10, 2020 at 7:21 PM Matthew Wilcox wrote: > > On Fri, Jul 10, 2020 at 02:49:32PM +0100, Christoph Hellwig wrote: > > On Fri, Jul 10, 2020 at 02:48:24PM +0100, Matthew Wilcox wrote: > > > If we're going to go the route of changing the CQE, how about: > > > > > > struct io_uring_cqe { >

[PATCH v4 0/9] KVM: nSVM: fixes for CR3/MMU switch upon nested guest entry/exit

2020-07-10 Thread Vitaly Kuznetsov
Changes since v3: - Swapped my "KVM: nSVM: stop dereferencing vcpu->arch.mmu to get the context in kvm_init_shadow{,_npt}_mmu()" with Paolo's "KVM: MMU: stop dereferencing vcpu->arch.mmu to get the context for MMU init". - keeping nested_svm_init_mmu_context() in nested_prepare_vmcb_control() as

[PATCH v4 9/9] KVM: x86: drop superfluous mmu_check_root() from fast_pgd_switch()

2020-07-10 Thread Vitaly Kuznetsov
The mmu_check_root() check in fast_pgd_switch() seems to be superfluous: when GPA is outside of the visible range cached_root_available() will fail for non-direct roots (as we can't have a matching one on the list) and we don't seem to care for direct ones. Also, raising #TF immediately when a non

[PATCH v4 1/9] KVM: nSVM: split kvm_init_shadow_npt_mmu() from kvm_init_shadow_mmu()

2020-07-10 Thread Vitaly Kuznetsov
As a preparatory change for moving kvm_mmu_new_pgd() from nested_prepare_vmcb_save() to nested_svm_init_mmu_context() split kvm_init_shadow_npt_mmu() from kvm_init_shadow_mmu(). This also makes the code look more like nVMX (kvm_init_shadow_ept_mmu()). No functional change intended. Signed-off-by:

[PATCH v4 4/9] KVM: nSVM: prepare to handle errors from enter_svm_guest_mode()

2020-07-10 Thread Vitaly Kuznetsov
Some operations in enter_svm_guest_mode() may fail, e.g. currently we suppress kvm_set_cr3() return value. Prepare the code to proparate errors. No functional change intended. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/svm/nested.c | 26 -- arch/x86/kvm/svm/svm.c

[PATCH v4 7/9] KVM: nSVM: implement nested_svm_load_cr3() and use it for host->guest switch

2020-07-10 Thread Vitaly Kuznetsov
Undesired triple fault gets injected to L1 guest on SVM when L2 is launched with certain CR3 values. #TF is raised by mmu_check_root() check in fast_pgd_switch() and the root cause is that when kvm_set_cr3() is called from nested_prepare_vmcb_save() with NPT enabled CR3 points to a nGPA so we can't

Re: [PATCH] mm: memcontrol: avoid workload stalls when lowering memory.high

2020-07-10 Thread Shakeel Butt
On Fri, Jul 10, 2020 at 5:29 AM Michal Hocko wrote: > > On Thu 09-07-20 12:47:18, Roman Gushchin wrote: > > Memory.high limit is implemented in a way such that the kernel > > penalizes all threads which are allocating a memory over the limit. > > Forcing all threads into the synchronous reclaim an

[PATCH v4 8/9] KVM: nSVM: use nested_svm_load_cr3() on guest->host switch

2020-07-10 Thread Vitaly Kuznetsov
Make nSVM code resemble nVMX where nested_vmx_load_cr3() is used on both guest->host and host->guest transitions. Also, we can now eliminate unconditional kvm_mmu_reset_context() and speed things up. Note, nVMX has two different paths: load_vmcs12_host_state() and nested_vmx_restore_host_state() a

[PATCH v4 2/9] KVM: MMU: stop dereferencing vcpu->arch.mmu to get the context for MMU init

2020-07-10 Thread Vitaly Kuznetsov
From: Paolo Bonzini kvm_init_shadow_mmu() was actually the only function that could be called with different vcpu->arch.mmu values. Now that kvm_init_shadow_npt_mmu() is separated from kvm_init_shadow_mmu(), we always know the MMU context we need to use and there is no need to dereference vcpu->

[PATCH v4 6/9] KVM: nSVM: move kvm_set_cr3() after nested_svm_uninit_mmu_context()

2020-07-10 Thread Vitaly Kuznetsov
kvm_mmu_new_pgd() refers to arch.mmu and at this point it still references arch.guest_mmu while arch.root_mmu is expected. Note, the change is effectively a nop: when !npt_enabled, nested_svm_uninit_mmu_context() does nothing (as we don't do nested_svm_init_mmu_context()) and with npt_enabled we d

Re: [PATCH v1] regmap: Switch to use fwnode instead of OF one

2020-07-10 Thread Andy Shevchenko
On Fri, Jul 10, 2020 at 4:36 PM Mark Brown wrote: > > On Fri, Jul 10, 2020 at 01:08:56PM +0100, Mark Brown wrote: > > On Fri, Jul 10, 2020 at 02:46:22PM +0300, Andy Shevchenko wrote: > > > > You mean it's being synchronised with git.kernel.org, but not yet > > > contains that > > > patch? Okay, I

[PATCH v4 3/9] KVM: nSVM: reset nested_run_pending upon nested_svm_vmrun_msrpm() failure

2020-07-10 Thread Vitaly Kuznetsov
WARN_ON_ONCE(svm->nested.nested_run_pending) in nested_svm_vmexit() will fire if nested_run_pending remains '1' but it doesn't really need to, we are already failing and not going to run nested guest. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/svm/nested.c | 2 ++ 1 file changed, 2 inserti

Re: [PATCH v1] regmap: Switch to use fwnode instead of OF one

2020-07-10 Thread Andy Shevchenko
On Fri, Jul 10, 2020 at 3:11 PM Mark Brown wrote: > > On Fri, Jul 10, 2020 at 02:46:22PM +0300, Andy Shevchenko wrote: > > > You mean it's being synchronised with git.kernel.org, but not yet contains > > that > > patch? Okay, I will monitor the regmap tree (as of now I didn't see any > > update)

[PATCH v4 5/9] KVM: nSVM: introduce nested_svm_load_cr3()/nested_npt_enabled()

2020-07-10 Thread Vitaly Kuznetsov
As a preparatory change for implementing nested specifig PGD switch for nSVM (following nVMX' nested_vmx_load_cr3()) instead of relying on kvm_set_cr3() introduce nested_svm_load_cr3(). No functional change intended. Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/svm/nested.c | 21 +++

Re: [PATCH v4 01/17] perf ftrace: select function/function_graph tracer automatically

2020-07-10 Thread Namhyung Kim
Hello, On Fri, Jul 10, 2020 at 10:43 PM Changbin Du wrote: > > The '-g/-G' options have already implied function_graph tracer should be > used instead of function tracer. So the extra option '--tracer' can be > killed. > > This patch changes the behavior as below: > - By default, function trace

Re: [PATCH v6 00/10] MT6779 IOMMU SUPPORT

2020-07-10 Thread Joerg Roedel
On Fri, Jul 03, 2020 at 12:41:17PM +0800, Chao Hao wrote: > Chao Hao (10): > dt-bindings: mediatek: Add bindings for MT6779 > iommu/mediatek: Rename the register STANDARD_AXI_MODE(0x48) to MISC_CTRL > iommu/mediatek: Use a u32 flags to describe different HW features > iommu/mediatek: Settin

Re: [PATCH] iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag

2020-07-10 Thread Joerg Roedel
Hi Will, On Fri, Jul 10, 2020 at 02:05:27PM +0100, Will Deacon wrote: > Ah, I'd already got this queued for 5.9: > > https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/updates > > and I've queued a small number of patches on top of it now. > > Are you plann

Re: [PATCH v4 0/4] printk: replace ringbuffer

2020-07-10 Thread Petr Mladek
On Fri 2020-07-10 11:58:34, John Ogness wrote: > On 2020-07-10, Petr Mladek wrote: > >> The next series in the printk-rework (move LOG_CONT handling from > >> writers to readers) makes some further changes that, while not > >> incompatible, could affect the output of existing tools. It may be a >

Re: [PATCH v3 6/9] drm/bridge: ti-sn65dsi86: Use 18-bit DP if we can

2020-07-10 Thread Rob Clark
On Thu, Jul 9, 2020 at 11:15 PM Steev Klimaszewski wrote: > > Hi, > > On 7/9/20 11:12 PM, Doug Anderson wrote: > >> root@c630:~# bus=$(i2cdetect -l | grep sn65 | sed > >> 's/i2c-\([0-9]*\).*$/\1/') > >> root@c630:~# i2cdump ${bus} 0x50 i > edid > >> WARNING! This program can confuse your I2C bus,

Re: [PATCH v1] regmap: Switch to use fwnode instead of OF one

2020-07-10 Thread Andy Shevchenko
On Fri, Jul 10, 2020 at 5:13 PM Andy Shevchenko wrote: > > On Fri, Jul 10, 2020 at 4:36 PM Mark Brown wrote: > > > > On Fri, Jul 10, 2020 at 01:08:56PM +0100, Mark Brown wrote: > > > On Fri, Jul 10, 2020 at 02:46:22PM +0300, Andy Shevchenko wrote: > > > > > > You mean it's being synchronised with

Re: [RFC] Kill THP deferred split queue?

2020-07-10 Thread Kirill A. Shutemov
On Tue, Jul 07, 2020 at 11:00:16AM -0700, Yang Shi wrote: > Hi folks, > > The THP deferred split queue is used to store PTE mapped THP (i.e. > partial unmapped THP) then they will get split by deferred split > shrinker when memory pressure kicks in. > > Now the page reclaim could handle such case

Re: [selftests] 7cb32086e5: kernel-selftests.x86.check_initial_reg_state_32.fail

2020-07-10 Thread Shuah Khan
On 7/10/20 12:02 AM, Yauheni Kaliuta wrote: On Thu, Jul 9, 2020 at 6:36 PM Shuah Khan wrote: On 7/9/20 12:49 AM, kernel test robot wrote: Greeting, FYI, we noticed the following commit (built with gcc-9): commit: 7cb32086e59b514a832a3e11f5370d37e7cfe022 ("selftests: simplify run_tests") ht

Re: [PATCH] IOMMU DRIVERS: Replace HTTP links with HTTPS ones

2020-07-10 Thread Joerg Roedel
On Wed, Jul 08, 2020 at 11:04:34PM +0200, Alexander A. Klimov wrote: > drivers/iommu/omap-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Queued, thanks.

[PATCH RFC 1/3] io_uring: use an enumeration for io_uring_register(2) opcodes

2020-07-10 Thread Stefano Garzarella
The enumeration allows us to keep track of the last io_uring_register(2) opcode available. Behaviour and opcodes names don't change. Signed-off-by: Stefano Garzarella --- include/uapi/linux/io_uring.h | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --gi

[PATCH RFC 0/3] io_uring: add restrictions to support untrusted applications and guests

2020-07-10 Thread Stefano Garzarella
Following the proposal that I send about restrictions [1], I wrote a PoC with the main changes. It is still WiP so I left some TODO in the code. I also wrote helpers in liburing and a test case (test/register-restrictions.c) available in this repository: https://github.com/stefano-garzarella/libur

<    1   2   3   4   5   6   7   8   9   10   >