Re: [PATCH V2 net-next 02/17] net: hns3: add support to modify tqps number

2017-12-19 Thread David Miller
From: Lipeng Date: Tue, 19 Dec 2017 12:02:24 +0800 > @@ -2651,6 +2651,19 @@ static int hns3_get_ring_config(struct hns3_nic_priv > *priv) > return ret; > } > > +static void hns3_put_ring_config(struct hns3_nic_priv *priv) > +{ > + struct hnae3_handle *h = priv->ae_handle; > + u1

[PATCH for-4.15] wireless: create, don't append, to shipped-certs.c

2017-12-19 Thread Brian Norris
The current rule for generating the {shipped,extra}-certs.c source files might create an invalid C source file, containing redefinitions of the same variables: CC [M] net/wireless/shipped-certs.o net/wireless/shipped-certs.c:686:10: error: redefinition of 'shipped_regdb_certs' const u8 shippe

[PATCH v2 0/9] soc: brcmstb: biuctrl updates for 64-bit chips

2017-12-19 Thread Florian Fainelli
Hi all, This patch series updates the Broadcom STB Bus Interface Unit controller to support newer chips such as 7260, 7268, 7271 and 7278. These chips require additional tuning in order to provide the expected bus throughput. In the process, we need to re-organize the common.c file a little bit i

[PATCH v2 2/9] dt-bindings: arm: brcmstb: Correct BIUCTRL node documentation

2017-12-19 Thread Florian Fainelli
Correct the Device Tree bindings for the HIF_CPUBIUCTRL node whose compatible string is actually brcm,bcm-cpu-biu-ctrl. Also document in the binding the fallback property ("brcm,brcmstb-cpu-biu-ctrl") and update the example accordingly. Signed-off-by: Florian Fainelli --- .../devicetree/bindings

[PATCH v2 1/9] dt-bindings: arm: Add entry for Broadcom Brahma-B53

2017-12-19 Thread Florian Fainelli
Broadcom's Brahma-B53 CPU is an ARMv8A processor used on a number of DSL, Cable Modem and Set-top-box SoCs. Acked-by: Rob Herring Signed-off-by: Florian Fainelli --- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindi

[PATCH v2 8/9] soc: brcmstb: Split initialization

2017-12-19 Thread Florian Fainelli
We may need access to family_id and product_id fairly early on boot for other parts of the code (e.g: biuctrl.c), so split the initialization between an early_init() and an arch_initcall() which allows us to do that. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/common.c | 27 +

[PATCH v2 9/9] soc: brcmstb: biuctrl: Move to early_initcall

2017-12-19 Thread Florian Fainelli
Being called during early_initcall() is early enough that it occurs before SMP initialization, which is all we care about for the Bus Interface Unit configuration. This solves lack of BIU initialization on ARM64 platforms where we do not have an anchor where to put the BIU initialization (since th

[PATCH v2 5/9] soc: brcmstb: biuctrl: Prepare for saving/restoring other registers

2017-12-19 Thread Florian Fainelli
In preparation for saving/restoring additional registers required on some newer platforms (7268, 7271, 7278), migrate the code to use enums and helper functions to access registers. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c | 75 ++-

[PATCH v2 6/9] soc: brcmstb: biuctrl: Wire-up new registers

2017-12-19 Thread Florian Fainelli
Add definitions for B53 systems register: CPU_MCP_FLOW_REG and CPU_WRITEBACK_CTRL_REG. These register will be saved and restored accordingly. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/s

[PATCH v2 7/9] soc: brcmstb: biuctrl: Fine tune B53 MCP interface settings

2017-12-19 Thread Florian Fainelli
In order to achieve expected MCP bus throughput on 3 particular chips: 7268, 7271 and 7278, do the appropriate programming of the MCP interface: increase number of MCP write credits, turn on write-back throttling when present. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c

Re: [PATCH 2/4] sched: cpufreq: Keep track of cpufreq utilization update flags

2017-12-19 Thread Peter Zijlstra
On Wed, Dec 13, 2017 at 03:23:21PM +0530, Viresh Kumar wrote: > Currently the schedutil governor overwrites the sg_cpu->flags field on > every call to the utilization handler. It was pretty good as the initial > implementation of utilization handlers, there are several drawbacks > though. > > The

[PATCH v2 4/9] soc: brcmstb: Correct CPU_CREDIT_REG offset for Brahma-B53 CPUs

2017-12-19 Thread Florian Fainelli
On Broadcom Brahma-B53 CPUs, the CPU_CREDIT_REG offset got moved to 0x0b0 instead of 0x184, correct this such that we correcty enable/disable write-pairing for these chips. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c | 24 +--- 1 file changed, 21 ins

Re: [-next PATCH 0/4] sysfs and DEVICE_ATTR_

2017-12-19 Thread Corey Minyard
On 12/19/2017 12:15 PM, Joe Perches wrote: drivers/char/ipmi/ipmi_msghandler.c| 17 +++--- For ipmi: Acked-by: Corey Minyard

[PATCH v2 3/9] soc: brcmstb: Make CPU credit offset more parameterized

2017-12-19 Thread Florian Fainelli
In preparation for fixing and changing values in the CPU_CREDIT_REG register for B53-based systems, make the offset parameterized. Signed-off-by: Florian Fainelli --- drivers/soc/bcm/brcmstb/biuctrl.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/soc/bcm

[PATCH] arm64: Stop printing the virtual memory layout

2017-12-19 Thread Laura Abbott
Printing kernel addresses should be done in limited circumstances, mostly for debugging purposes. Printing out the virtual memory layout at every kernel bootup doesn't really fall into this category so delete the prints. There are other ways to get the same information. Signed-off-by: Laura Abbott

Re: [PATCH RFC] stat.2: Document that stat can fail with EINTR

2017-12-19 Thread Michael Kerrisk (man-pages)
On 19 December 2017 at 18:52, Keno Fischer wrote: > Yes it seems like an EINTR return should be considered a bug, so please drop > this from your patch queue. Thanks for the follow up. Okay -- thanks for the info. Cheers, Michael > On Dec 19, 2017 14:57, "Michael Kerrisk (man-pages)" > wrote

Re: proc_flush_task oops

2017-12-19 Thread Dave Jones
On Tue, Dec 19, 2017 at 12:27:30PM -0600, Eric W. Biederman wrote: > Dave Jones writes: > > > On Mon, Dec 18, 2017 at 03:50:52PM -0800, Linus Torvalds wrote: > > > > > But I don't see what would have changed in this area recently. > > > > > > Do you end up saving the seeds that cause c

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Matthew Wilcox
On Tue, Dec 19, 2017 at 09:52:27AM -0800, rao.sho...@oracle.com wrote: > @@ -129,6 +130,7 @@ int __kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t > flags, size_t nr, > > for (i = 0; i < nr; i++) { > void *x = p[i] = kmem_cache_alloc(s, flags); > + > if (!x) {

Re: [PATCH RESEND] cpufreq: schedutil: Use idle_calls counter of the remote CPU

2017-12-19 Thread Joel Fernandes
On Tue, Dec 19, 2017 at 10:48 AM, Peter Zijlstra wrote: > On Tue, Dec 19, 2017 at 09:47:12AM -0800, Joel Fernandes wrote: >> Since the recent remote cpufreq callback work, its possible that a cpufreq >> update is triggered from a remote CPU. For single policies however, the >> current >> code use

Re: [PATCH v3] sched/deadline: runtime overrun signal

2017-12-19 Thread Peter Zijlstra
On Tue, Dec 12, 2017 at 12:50:40PM +0100, Ingo Molnar wrote: > > * Claudio Scordino wrote: > > > From: Juri Lelli > > > - ~(SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM)) > > + ~(SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM | > > + SCHED_FLAG_DL_OVERRUN)

Re: [PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-19 Thread Peter Zijlstra
On Sat, Dec 09, 2017 at 09:03:49AM +0100, Filippo Sironi wrote: > ... since total = sched_avg_period() + delta can yield 0x1, > which results in a division by 0, given that div_u64() takes a u32 > divisor. Use div64_u64() instead. > > divide error: [#1] SMP > CPU: 7 PID: 0 Comm: swap

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Jesper Dangaard Brouer
On Tue, 19 Dec 2017 09:52:27 -0800 rao.sho...@oracle.com wrote: > diff --git a/mm/slab_common.c b/mm/slab_common.c > index c8cb367..06fd12c 100644 > --- a/mm/slab_common.c > +++ b/mm/slab_common.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #define CREATE_TRACE_

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Christopher Lameter
On Tue, 19 Dec 2017, rao.sho...@oracle.com wrote: > This patch updates kfree_rcu to use new bulk memory free functions as they > are more efficient. It also moves kfree_call_rcu() out of rcu related code to > mm/slab_common.c It would be great to have separate patches so that we can review it pro

[RFC PATCH 01/60] hyper_dmabuf: initial working version of hyper_dmabuf drv

2017-12-19 Thread Dongwon Kim
Upload of intial version of hyper_DMABUF driver enabling DMA_BUF exchange between two different VMs in virtualized platform based on hypervisor such as KVM or XEN. Hyper_DMABUF drv's primary role is to import a DMA_BUF from originator then re-export it to another Linux VM so that it can be mapped

[RFC PATCH 02/60] hyper_dmabuf: added a doc for hyper_dmabuf sharing

2017-12-19 Thread Dongwon Kim
High-level description of hyper_dmabuf driver has been added to "Documentation" directory. Signed-off-by: Dongwon Kim --- Documentation/hyper-dmabuf-sharing.txt | 734 + 1 file changed, 734 insertions(+) create mode 100644 Documentation/hyper-dmabuf-sharing.txt

[RFC PATCH 03/60] hyper_dmabuf: re-use dma_buf previously exported if exist

2017-12-19 Thread Dongwon Kim
Now we re-use dma_buf instead of exporting it via normal process (including new mappings). For this, hyper_dmabuf list entries can be searched with "struct dma_buf*". Also, ioctl (export_remote) is modified to just return hyper_dmabuf_id if the specific dmabuf has already been exported to the targe

[RFC PATCH 12/60] hyper_dmabuf: two different unexporting mechanisms

2017-12-19 Thread Dongwon Kim
unexporting on exporter's side now have two options, one is , that just remove and free everything to literally "disconnect" from importer, the other is just to return fail if any apps running on importer is still attached or DMAing. Currently whether forcing or unforcing it is determined by how "F

[RFC PATCH 15/60] hyper_dmabuf: reusing previously released hyper_dmabuf_id

2017-12-19 Thread Dongwon Kim
Now, released hyper_dmabuf_ids are stored in a stack - (hyper_dmabuf_private.id_queue) for reuse. This is to prevent overflow of ids for buffers. We also limit maximum number for the id to 1000 for the stability and optimal performance. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/Mak

[RFC PATCH 36/60] hyper_dmabuf: error handling when share_pages fails

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola When error occurs while sharing pages, all pages already shared needs to be un-shared and proper error code has to be returned. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 6 ++- .../xen/hyper_dmabuf/xen/hyper_dmabuf_xen_shm.c|

[RFC PATCH 28/60] hyper_dmabuf: address several synchronization issues

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola This patch addresses several synchronization issues while sharing DMA_BUF with another VM. 1. Set WAIT_AFTER_SYNC_REQ to false by default to prevent possible performance degradation when waing for the response for every syncrhonization request to exporter VM. 2. Remo

[RFC PATCH 59/60] hyper_dmabuf: freeing hy_drv_priv when drv init fails (v2)

2017-12-19 Thread Dongwon Kim
From: Kai Chen Make sure hy_drv_priv is freed before exiting in several places in hyper_dmabuf_drv_init. v2: unlocking mutex before freeing hy_drv_priv when bknd_ops->init fails Signed-off-by: Kai Chen Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c | 7 ++- 1

[RFC PATCH 56/60] hyper_dmabuf: add initialization and cleanup to bknd_ops

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Introduced additional init and cleanup routines in the backend API structure that might be useful for hypervisors other than Xen. Signed-off-by: Mateusz Polrola Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c | 14 ++ driver

[RFC PATCH 58/60] hyper_dmabuf: move device node out of /dev/xen/

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola hyper_dmabuf driver is generic driver that is designed to work with any hypervisor with various backend implementations. So moving out its device node out of /dev/xen. Signed-off-by: Mateusz Polrola Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv

[RFC PATCH 57/60] hyper_dmabuf: change type of ref to shared pages to unsigned long

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Changed data type of reference for the group of pages to be shared unsigned long in case it is direct representation of the memory address. Signed-off-by: Mateusz Polrola Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.h | 2 +- drivers/x

[RFC PATCH 55/60] hyper_dmabuf: fixed wrong send_req call

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Wrong vmid is used in case of sending HYPER_DMABUF_EXPORT_FD_FAILED message. Instead of vmid, hypder dmabuf id is being used. Signed-off-by: Mateusz Polrola Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 2 +- 1 file changed, 1 insertion(+

[RFC PATCH 30/60] hyper_dmabuf: free already mapped pages when error happens

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola It is needed to freeing already-mapped pages if it gets error before finishing mapping all pages. Signed-off-by: Dongwon Kim --- .../xen/hyper_dmabuf/xen/hyper_dmabuf_xen_shm.c| 43 +++--- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/

[RFC PATCH 53/60] hyper_dmabuf: define fastpath_export for exporting existing buffer

2017-12-19 Thread Dongwon Kim
To make hyper_dmabuf_export_remote_ioctl more compact and readable, a new function call, 'fastpath_export' is created to replace a routine in hyper_dmabuf_export_remote_ioctl for the case requested buffer for exporting is already in the LIST (exported previously). Signed-off-by: Dongwon Kim ---

[RFC PATCH 50/60] hyper_dmabuf: fix styling err and warns caught by checkpatch.pl

2017-12-19 Thread Dongwon Kim
Fixing all styling problems caught by checkpatch.pl Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 53 ++-- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.h| 6 +- drivers/xen/hyper_dmabuf/hyper_dmabuf_event.c | 12 +- drivers/xen/hyper_dmabuf/hyp

[RFC PATCH 54/60] hyper_dmabuf: 'backend_ops' reduced to 'bknd_ops' and 'ops' to 'bknd_ops'

2017-12-19 Thread Dongwon Kim
To make type's name compact, *_backend_ops is changed to '*_bknd_ops'. Also 'ops' is now changed to 'bknd_ops' to clarify it is a data structure with entry points of 'backend' operations. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 14 +-- drivers/

[RFC PATCH 51/60] hyper_dmabuf: missing mutex_unlock and move spinlock

2017-12-19 Thread Dongwon Kim
Added missing mutex_unlock to make sure mutex is unlocked before returning. Also, moved spinlock lock/unlock into hyper_dmabuf_send_event and remove checking on spinlock (with assumption caller does the spinlock in advance) to make it more straight forward. This patch includes a couple of minor m

[RFC PATCH 52/60] hyper_dmabuf: remove prefix 'hyper_dmabuf' from static func and backend APIs

2017-12-19 Thread Dongwon Kim
Removed prefix "hyper_dmabuf" from backend functions and static func (except for driver APIs) and add 'be' after 'xen' in backend function calls to show those are backend APIs. Also, modified some of function names for clarification and addressed some missing errors and warnings in hyper_dmabuf_l

[RFC PATCH 48/60] hyper_dmabuf: add query items for buffer private info.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola This change adds two query items, 'HYPER_DMABUF_QUERY_PRIV_INFO_SIZE' and 'HYPER_DMABUF_QUERY_PRIV_INFO', for retrieving buffer's private info and its size. 'info' is an address of user-space buffer (user application provides this) ,where private data will be copied in case

[RFC PATCH 26/60] hyper_dmabuf: add mutexes to prevent several race conditions

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Added mutex to export_fd ioctl to prevent double pages mapping of the same buffer to prevent race condition when two consumers are trying to map the same buffer on importer VM. Also locked mutex before sending request via xen communication channel to prevent req_pending ove

[RFC PATCH 46/60] hyper_dmabuf: delay auto initialization of comm_env

2017-12-19 Thread Dongwon Kim
Comm env intialization is now scheduled to be done when xenstore is initialized. This scheduling is done in driver's init routine. Also, adding a recursively scheduled routine that monitors any new tx ch setup from other domains and automaticlaly configure rx channel accordingly (every 10 sec). O

[RFC PATCH 44/60] hyper_dmabuf: proper handling of sgt_info->priv

2017-12-19 Thread Dongwon Kim
sgt_info->priv will be used to store user private info passed in ioctl. Data in sgt_info->priv is transfered via comm channel to the importer VM whenever DMA_BUF is exported to keep the private data synchroized across VMs. This patch also adds hyper_dmabuf_send_export_msg that replaces some of exp

[RFC PATCH 47/60] hyper_dmabuf: fix issues with event-polling

2017-12-19 Thread Dongwon Kim
This patch fixes several defects on event handling including: 1. Imported sgt info and exported sgt info now have buffer for private data (priv) with variable size 2. Now user input to export_remote_ioctl contain sz_priv, which specifies size of private data (e.g. meta data) 3. Increased m

[RFC PATCH 45/60] hyper_dmabuf: adding poll/read for event generation

2017-12-19 Thread Dongwon Kim
hyper_dmabuf driver on importing domain now generates event every time new hyper_dmabuf is available (visible) to the importer. Each event comes with 128 byte private data, which can contain any meta data or user data specific to the originator of DMA BUF. Signed-off-by: Dongwon Kim --- drivers

[RFC PATCH 42/60] hyper_dmabuf: always generate a new random keys

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Need to update random keys when reusing hyper_dmabuf_id in the list to increase security Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_id.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/xen/hyper_dmabuf/hyper_dmabu

[RFC PATCH 40/60] hyper_dmabuf: do not use 'private' as field name

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Using a word, 'private' is not recommended because of conflict with language keyword when compiling with C++. So changing those to 'priv'. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 8 include/uapi/xen/hyper_dmabuf.h

[RFC PATCH 43/60] hyper_dmabuf: fixes on memory leaks in various places

2017-12-19 Thread Dongwon Kim
Make sure to free buffers before returning to prevent memory leaks Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 19 +++- drivers/xen/hyper_dmabuf/hyper_dmabuf_msg.c| 9 +++- drivers/xen/hyper_dmabuf/hyper_dmabuf_ops.c| 6 ++- drivers/x

[RFC PATCH 41/60] hyper_dmabuf: re-organize driver source

2017-12-19 Thread Dongwon Kim
Re-orginized source code for more intuitive structure For this, 1. driver's file operations other than ioctls have been moved to hyper_dmabuf_drv.c. 2. Separated out dma-buf operations from hyper_dmabuf_ops.c and put those in a new file, 'hyper_dmabuf_ops.c'. Remaining part (SGT core management)

[RFC PATCH 34/60] hyper_dmabuf: extend DMA bitmask to 64-bits.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Extending DMA bitmask of hyper_dmabuf device to cover whole address space driver may access. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/hyper_dmabuf/hyper_dma

[RFC PATCH 27/60] hyper_dmabuf: use proper error codes

2017-12-19 Thread Dongwon Kim
Cleaned up and corrected error codes and condition in various error check routines. Also added proper err messages when func returns error. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 14 +++-- drivers/xen/hyper_dmabuf/hyper_dmabuf_id.c | 2 +- dr

[RFC PATCH 35/60] hyper_dmabuf: 128bit hyper_dmabuf_id with random keys

2017-12-19 Thread Dongwon Kim
The length of hyper_dmabuf_id is increased to 128bit by adding random key (96bit) to the id. This is to prevent possible leak of the id by guessing on importer VM (by unauthorized application). hyper_dmabuf_id_t is now defined as, typedef struct { int id; int rng_k

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 11:12 AM, Matthew Wilcox wrote: On Tue, Dec 19, 2017 at 09:52:27AM -0800, rao.sho...@oracle.com wrote: This patch updates kfree_rcu to use new bulk memory free functions as they are more efficient. It also moves kfree_call_rcu() out of rcu related code to mm/slab_common.c Signed

[RFC PATCH 39/60] hyper_dmabuf: correcting DMA-BUF clean-up order

2017-12-19 Thread Dongwon Kim
Reordering clean-up procedure Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 37 +-- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c b/drivers/xen/hyper_dmabuf/hyper_dmabuf_ioct

[RFC PATCH 37/60] hyper_dmabuf: implementation of query ioctl

2017-12-19 Thread Dongwon Kim
List of queries is re-defined. Now it supports following items: enum hyper_dmabuf_query { DMABUF_QUERY_TYPE = 0x10, DMABUF_QUERY_EXPORTER, DMABUF_QUERY_IMPORTER, DMABUF_QUERY_SIZE, DMABUF_QUERY_BUSY,

[RFC PATCH 38/60] hyper_dmabuf: preventing self exporting of dma_buf

2017-12-19 Thread Dongwon Kim
Adding ID check to make sure a dma-buf is exported externally since hyper_dmabuf only allows to export a dmabuf to a different VM. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/xen/hyper_dmabuf/hyper

[RFC PATCH 29/60] hyper_dmabuf: make sure to release allocated buffers when exiting

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola It is required to release all allocated buffers when the application crashes. With the change, hyper_dmabuf_sgt_info includes file pointers for the driver. If it's released unexpectedly, the driver is now unexporting all already-exported buffers to prevent memory leak. In c

Re: [PATCH v2] clk: check ops pointer on clock register

2017-12-19 Thread Michael Turquette
Quoting Jerome Brunet (2017-12-19 00:33:29) > Nothing really prevents a provider from (trying to) register a clock > without providing the clock ops structure. > > We do check the individual fields before using them, but not the > structure pointer itself. This may have the usual nasty consequence

[RFC PATCH 32/60] hyper_dmabuf: make all shared pages read-only

2017-12-19 Thread Dongwon Kim
All shared pages need to be read-only from importer's point of view to prevent the buffer from being corrupted. This patch may need to be reverted if we find a better way to protect the original content in this sharing model. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/xen/hyper_dma

[RFC PATCH 31/60] hyper_dmabuf: built-in compilation option

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Enabled built-in compilation option of hyper_dmabuf driver. Also, moved backend initialization into open() to remove its dependencies on Kernel booting sequence. hyper_dmabuf.h is now installed as one of standard header files of Kernel. This patch also addresses possible m

[RFC PATCH 33/60] hyper_dmabuf: error checking on the result of dma_buf_map_attachment

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Added error checking on the result of function call, dma_buf_map_attachment Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c b/drivers/xen/h

Re: [RFC PATCH] sched: Improve scalability of select_idle_sibling using SMT balance

2017-12-19 Thread Peter Zijlstra
On Fri, Dec 08, 2017 at 12:07:54PM -0800, subhra mazumdar wrote: > +static inline void > +sd_context_switch(struct sched_domain *sd, struct rq *rq, int util) > +{ > + struct sched_group *sg_cpu; > + > + /* atomically add/subtract the util */ > + sg_cpu = sd->sg_cpu; > + if (util >

[RFC PATCH 25/60] hyper_dmabuf: introduced delayed unexport

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola To prevent overhead when a DMA BUF needs to be exported right after it is unexported, a marginal delay is introduced in unexporting process. This adds a probation period to the unexporting process. If the same DMA_BUF is requested to be exported agagin, unexporting process i

[RFC PATCH 23/60] hyper_dmabuf: use CONFIG_HYPER_DMABUF_XEN instead of CONFIG_XEN

2017-12-19 Thread Dongwon Kim
Now, use CONFIG_HYPER_DMABUF_XEN as a configuration option for building hyper_dmabuf for Xen hypervisor. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c

[RFC PATCH 24/60] hyper_dmabuf: waits for resp only if WAIT_AFTER_SYNC_REQ == 1

2017-12-19 Thread Dongwon Kim
hyper_dmabuf's sync_request (previously hyper_dmabuf_sync_request_ and_wait) now does not wait for the response from exporter if WAIT_AFTER_SYNC_REQ==0. This is to prevent peformance degradation due to the communication latency while doing indirect hyper DMABUF synchronization. This patch also inc

[RFC PATCH 11/60] hyper_dmabuf: check stack before unmapping/detaching shadow DMA_BUF

2017-12-19 Thread Dongwon Kim
Make sure list of mapping/attaching activities on impoter VM is not empty before doing unmapping/detaching shadow DMA BUF for indirect synchronization. Signed-off-by: Dongwon Kim --- .../xen/hyper_dmabuf/hyper_dmabuf_remote_sync.c| 68 +- 1 file changed, 53 insertions(+),

[RFC PATCH 21/60] hyper_dmabuf: exposing drv information using sysfs

2017-12-19 Thread Dongwon Kim
From: Michał Janiszewski This adds two entries in SYSFS with information about imported and exported entries. The information exposed contains details about number of pages, whether a buffer is valid or not, and importer/exporter count. Sysfs for hyper_dmabuf can be enabled by setting a new conf

[RFC PATCH 20/60] hyper_dmabuf: optimized loop with less condition check

2017-12-19 Thread Dongwon Kim
Redefined nents_last, which means # of gref in the last page of lvl2 table in any situation even if it is same as REFS_PER_PAGE. With this, loop can be simplified with less condition check. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/xen/hyper_dmabuf_xen_shm.c | 8 +--- 1 file ch

[RFC PATCH 22/60] hyper_dmabuf: configure license

2017-12-19 Thread Dongwon Kim
Set the license of the driver to "GPL and MIT-X dual" and owner to "Intel". Also attached license term to all source and header files Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_conf.h | 26 ++ drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 32

[RFC PATCH 19/60] hyper_dmabuf: fix the case with sharing a buffer with 2 pages

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Checking whether buffer has more than two pages should be done by evaluating nents > 1 instead of i > 1 to properly cover the case when nents == 2. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_imp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[RFC PATCH 17/60] hyper_dmabuf: use dynamic debug macros for logging

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Replaces printk to debug macros Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 4 +- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.h| 4 ++ drivers/xen/hyper_dmabuf/hyper_dmabuf_imp.c| 46 +- drivers/xen/hyper

[RFC PATCH 18/60] hyper_dmabuf: reset comm channel when one end has disconnected.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola When exporter or importer is disconnected, ring buffer should be reinitialzed, otherwise on next reconnection exporter/importer will receive old requests/responses remaining in the ring buffer, which are not valid anymore. This patch also blocks back ring irq until communic

[RFC PATCH 16/60] hyper_dmabuf: define hypervisor specific backend API

2017-12-19 Thread Dongwon Kim
For adoption of hyper_dmabuf driver to various hypervisors other than Xen, a "backend" layer is defined and separated out from existing one-body structure. "Backend" is basically a list of entry points of function calls that provides method to do Kernel's page-level sharing and inter VMs communica

[RFC PATCH 10/60] hyper_dmabuf: make sure to free memory to prevent leak

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola In hyper_dmabuf_export_remote, page_info->pages needs to be freed before freeing page_info. Also, info_entry in hyper_dmabuf_remove_exported/imported and hyper_dmabuf_remove_exporter/importer_ring needs to be freed after removal of an entry. Signed-off-by: Dongwon Kim ---

[RFC PATCH 13/60] hyper_dmabuf: postponing cleanup of hyper_DMABUF

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Immediate clean up of buffer is not possible if the buffer is actively used by importer. In this case, we need to postpone freeing hyper_DMABUF until the last consumer unmaps and releases the buffer on impoter VM. New reference count is added for tracking usage by importers.

[RFC PATCH 14/60] hyper_dmabuf: clean-up process based on file->f_count

2017-12-19 Thread Dongwon Kim
Now relaese funcs checks f_count for the file instead of our own refcount because it can't track dma_buf_get. Also, importer now sends out HYPER_DMABUF_FIRST_EXPORT to let the exporter know corresponding dma-buf has ever exported on importer's side. This is to cover the case where exporter exports

[RFC PATCH 04/60] hyper_dmabuf: new index, k for pointing a right n-th page

2017-12-19 Thread Dongwon Kim
Need a new index, k in hyper_dmabuf_extract_pgs function for picking up a correct n-th page in contigous memory space. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_imp.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/xen/hyper_dmab

[RFC PATCH 09/60] hyper_dmabuf: indirect DMA_BUF synchronization via shadowing

2017-12-19 Thread Dongwon Kim
Importer now sends a synchronization request to the exporter when any of DMA_BUF operations on imported Hyper_DMABUF is executed (e.g dma_buf_map and dma_buf_unmap). This results in a creation of shadow DMA_BUF and exactly same DMA_BUF operation to be executed on it. The main purpose of this is to

[RFC PATCH 08/60] hyper_dmabuf: automatic comm channel initialization using xenstore

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola This introduces use of xenstore for creating and managing communication channels between two VMs in the system. When hyper_dmabuf driver is loaded in the service VM (host OS), a new xenstore directory, "/local/domain//data/hyper_dmabuf" is created in xenstore filesystem. Wh

[RFC PATCH 07/60] hyper_dmabuf: message parsing done via workqueue

2017-12-19 Thread Dongwon Kim
Use workqueue mechanism to delay message parsing done after exiting from ISR to reduce ISR execution time. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 13 ++ drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.h| 5 + drivers/xen/hyper_dmabuf/hyper_dmabuf

[RFC PATCH 06/60] hyper_dmabuf: map shared pages only once when importing.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola If shared pages of buffer were already mapped on importer side, do not map them again on next request to export fd. Signed-off-by: Mateusz Polrola Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 20 +++- 1 file changed, 11 i

[RFC PATCH 05/60] hyper_dmabuf: skip creating a comm ch if exist for the VM

2017-12-19 Thread Dongwon Kim
hyper_dmabuf_importer_ring_setup creates new channel only if there is no existing downstream communication channel previously created for the exporter VM. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_imp.c | 13 +++-- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.

Re: Regression with a0747a859ef6 ("bdi: add error handle for bdi_debug_register")

2017-12-19 Thread Bruno Wolff III
On Tue, Dec 19, 2017 at 10:24:52 -0800, Shaohua Li wrote: Not sure if this is MD related, but could you please check if this debug patch changes anything? I'm doing a build now. I do use md to mirror disk partitions between two disks. I do that on another machine that doesn't exhibit the pro

Re: [PATCH v.2] 4.15 vmgfx boot warning

2017-12-19 Thread Sinclair Yeh
This looks okay to me. On Mon, Dec 18, 2017 at 07:26:03PM -0500, Woody Suwalski wrote: > The 4.15 drm_atomic_helper driver shows a warning during boot (both 32 and > 64 bit x86) > It is caused by a mismatch between the result of vmw_enable_vblank() and > what the drm_atomic_helper expects: >    /.

[PATCH] tools/power: Don't make man pages executable

2017-12-19 Thread Laura Abbott
rpm-lint flagged these as being executable: kernel-tools.x86_64: W: spurious-executable-perm /usr/share/man/man8/turbostat.8.gz kernel-tools.x86_64: W: spurious-executable-perm /usr/share/man/man8/x86_energy_perf_policy.8.gz Fix this Signed-off-by: Laura Abbott --- tools/power/x86/turbostat

Re: [PATCH v2 1/2] clk: tegra: Mark HCLK, SCLK, EMC, MC and PLL_P outputs as critical

2017-12-19 Thread Michael Turquette
Quoting Dmitry Osipenko (2017-12-18 19:59:06) > Machine dies if HCLK, SCLK or EMC is disabled, hence mark these clocks > as critical. Currently some of drivers do not manage clocks properly, > expecting clocks to be 'always enabled', these clocks are MC and PLL_P > outputs. Let's mark MC or PLL_P o

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 11:30 AM, Matthew Wilcox wrote: On Tue, Dec 19, 2017 at 09:52:27AM -0800, rao.sho...@oracle.com wrote: @@ -129,6 +130,7 @@ int __kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t nr, for (i = 0; i < nr; i++) { void *x = p[i] = kmem_cache_allo

[PATCH 2/2] perf: Don't make sourced script executable

2017-12-19 Thread Laura Abbott
rpm lint flagged this: perf.x86_64: E: executable-sourced-script /etc/bash_completion.d/perf 755 Make this not be executable Signed-off-by: Laura Abbott --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefi

Re: [PATCH] KVM: vmx: speed up MSR bitmap merge

2017-12-19 Thread Jim Mattson
On Wed, Dec 13, 2017 at 5:30 AM, Paolo Bonzini wrote: > The bulk of the MSR bitmap is either immutable, or can be copied from > the L1 bitmap. By initializing it at VMXON time, and copying the mutable > parts one long at a time on vmentry (rather than one bit), about 4000 > clock cycles (30%) can

Re: [PATCH v3 2/5] staging: rtl8712: style fix multiple line dereferences

2017-12-19 Thread Martin Homuth
On 12/19/2017 05:41 PM, Joe Perches wrote: > On Tue, 2017-12-19 at 17:32 +0100, Martin Homuth wrote: >> This patch fixes various coding style issues in the rtl8712 module as >> noted by checkpatch.pl related to dereferencing over multiple lines. > [] >> diff --git a/drivers/staging/rtl8712/rtl8712_

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 11:33 AM, Christopher Lameter wrote: On Tue, 19 Dec 2017, rao.sho...@oracle.com wrote: This patch updates kfree_rcu to use new bulk memory free functions as they are more efficient. It also moves kfree_call_rcu() out of rcu related code to mm/slab_common.c It would be great to

Re: dst refcount is -1

2017-12-19 Thread Ortwin Glück
On 12/19/2017 07:09 PM, Wei Wang wrote: Would you give more details under what circumstances it happened? Circumstances are unknown as I can't correlate that log line to anything else. If I have to guess, then it has to do with ipsec events. These tunnel tend to go up and down a lot and there

[PATCH 2/2] scsi: ufs: use sysfs entry for health info

2017-12-19 Thread Jaegeuk Kim
From: Jaegeuk Kim This patch introduces sysfs entries to show the information. # cat /sys/devices/soc/1da4000.ufshc/health/eol # cat /sys/devices/soc/1da4000.ufshc/health/length # cat /sys/devices/soc/1da4000.ufshc/health/lifetimeA # cat /sys/devices/soc/1da4000.ufshc/health/lifetimeB # cat

[PATCH 1/2] scsi: ufs: introduce static sysfs entries

2017-12-19 Thread Jaegeuk Kim
From: Jaegeuk Kim This patch introduces attribute group to show existing sysfs entries. Cc: Greg KH Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 48 +++ drivers/scsi/ufs/ufshcd.h | 2 -- 2 files changed, 19 insertions(+), 31 deletions

[PATCH] platform/x86/mlxcpld-hotplug: Delete an error message for a failed memory allocation in mlxcpld_hotplug_attr_init()

2017-12-19 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 19 Dec 2017 20:56:56 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/platform/x86/mlxcpld-hotplug.c | 5 + 1 file changed, 1 in

linux-next: Signed-off-by missing for commit in the tip tree

2017-12-19 Thread Stephen Rothwell
Hi all, Commit 44d5c715330c ("x86/mm: Create asm/invpcid.h") is missing a Signed-off-by from its committer. -- Cheers, Stephen Rothwell

Re: [PATCH 2/4] perf/x86/intel: fix event update for auto-reload

2017-12-19 Thread Liang, Kan
On 12/19/2017 1:58 PM, Peter Zijlstra wrote: On Mon, Dec 18, 2017 at 03:34:49AM -0800, kan.li...@linux.intel.com wrote: arch/x86/events/core.c | 14 ++ arch/x86/events/intel/ds.c | 8 +++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/c

Re: [PATCH v2 09/13] MIPS: mscc: Add initial support for Microsemi MIPS SoCs

2017-12-19 Thread Alexandre Belloni
Hi, On 19/12/2017 at 20:27:02 +0530, PrasannaKumar Muralidharan wrote: > Given the fact that setup code is very small and most of it is generic > code I strongly believe that it is plausible to make use of generic > code completely. Please have a look at [1] and [2]. > > 1. https://patchwork.kern

<    4   5   6   7   8   9   10   11   12   >