[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

[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 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

[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

[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

[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

[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

[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 ---

[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

[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).

[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

[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

[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).

[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

[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

[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

[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

[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

[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|

[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

[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 +--

[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

[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 +-

[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 +-

[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 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 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

[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

[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 ---

[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

[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:

[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

[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 ---

[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 +-

[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 ---

[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 ++

[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

[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 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

[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.

[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 ++-

[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 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 ---

[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 ---

[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

[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

[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

[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

[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

[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 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 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

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

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

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

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

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:

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:

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

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 | > > +

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

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

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] 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: 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

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

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

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)" >

[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

[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

[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

[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

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

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 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 +---

[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

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

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 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 ---

[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 ---

[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(-)

[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

[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 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 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

[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

[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 ---

[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 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(+)

[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

[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 ---

[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 ---

[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

[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

[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

[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

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 =

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; > +

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

2017-12-19 Thread David Miller
From: Lipeng Date: Tue, 19 Dec 2017 12:02:23 +0800 > @@ -5002,6 +5002,26 @@ static void hclge_uninit_ae_dev(struct hnae3_ae_dev > *ae_dev) > ae_dev->priv = NULL; > } > > +static u32 hclge_get_max_channels(struct hnae3_handle *handle) > +{ > + struct

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

2017-12-19 Thread David Miller
From: Lipeng Date: Tue, 19 Dec 2017 12:02:23 +0800 > @@ -5002,6 +5002,26 @@ static void hclge_uninit_ae_dev(struct hnae3_ae_dev > *ae_dev) > ae_dev->priv = NULL; > } > > +static u32 hclge_get_max_channels(struct hnae3_handle *handle) > +{ > + struct hclge_vport *vport =

<    5   6   7   8   9   10   11   12   13   14   >