[PATCH 3.18 47/60] udf: Fix deadlock between writeback and udf_setsize()

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Jan Kara commit f2e95355891153f66d4156bf3a142c6489cd78c6 upstream. udf_setsize() called truncate_setsize() with i_data_sem held. Thus truncate_pagecache() called from

[PATCH 3.18 47/60] udf: Fix deadlock between writeback and udf_setsize()

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Jan Kara commit f2e95355891153f66d4156bf3a142c6489cd78c6 upstream. udf_setsize() called truncate_setsize() with i_data_sem held. Thus truncate_pagecache() called from truncate_setsize() could

[PATCH 3.18 50/60] Revert "perf/core: Drop kernel samples even though :u is specified"

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Ingo Molnar commit 6a8a75f3235724c5941a33e287b2f98966ad14c5 upstream. This reverts commit cc1582c231ea041fbc68861dfaf957eaf902b829. This commit introduced a regression that

[PATCH 3.18 50/60] Revert "perf/core: Drop kernel samples even though :u is specified"

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Ingo Molnar commit 6a8a75f3235724c5941a33e287b2f98966ad14c5 upstream. This reverts commit cc1582c231ea041fbc68861dfaf957eaf902b829. This commit introduced a regression that broke rr-project,

[PATCH 3.18 51/60] staging: rtl8188eu: add TL-WN722N v2 support

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Michael Gugino commit 5a1d4c5dd4eb2f1f8a9b30e61762f3b3b564df70 upstream. Add support for USB Device TP-Link TL-WN722N v2. VendorID: 0x2357, ProductID: 0x010c

[PATCH 3.18 51/60] staging: rtl8188eu: add TL-WN722N v2 support

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Michael Gugino commit 5a1d4c5dd4eb2f1f8a9b30e61762f3b3b564df70 upstream. Add support for USB Device TP-Link TL-WN722N v2. VendorID: 0x2357, ProductID: 0x010c Signed-off-by: Michael Gugino

[PATCH v2 02/13] xen/pvcalls: connect to the backend

2017-07-25 Thread Stefano Stabellini
Implement the probe function for the pvcalls frontend. Read the supported versions, max-page-order and function-calls nodes from xenstore. Introduce a data structure named pvcalls_bedata. It contains pointers to the command ring, the event channel, a list of active sockets and a list of passive

[PATCH v2 02/13] xen/pvcalls: connect to the backend

2017-07-25 Thread Stefano Stabellini
Implement the probe function for the pvcalls frontend. Read the supported versions, max-page-order and function-calls nodes from xenstore. Introduce a data structure named pvcalls_bedata. It contains pointers to the command ring, the event channel, a list of active sockets and a list of passive

[PATCH v2 03/13] xen/pvcalls: implement socket command and handle events

2017-07-25 Thread Stefano Stabellini
Send a PVCALLS_SOCKET command to the backend, use the masked req_prod_pvt as req_id. This way, req_id is guaranteed to be between 0 and PVCALLS_NR_REQ_PER_RING. We already have a slot in the rsp array ready for the response, and there cannot be two outstanding responses with the same req_id. Wait

[PATCH v2 03/13] xen/pvcalls: implement socket command and handle events

2017-07-25 Thread Stefano Stabellini
Send a PVCALLS_SOCKET command to the backend, use the masked req_prod_pvt as req_id. This way, req_id is guaranteed to be between 0 and PVCALLS_NR_REQ_PER_RING. We already have a slot in the rsp array ready for the response, and there cannot be two outstanding responses with the same req_id. Wait

[PATCH v2 04/13] xen/pvcalls: implement connect command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for the active socket. Introduce a data structure to keep track of sockets. Introduce a waitqueue to allow the frontend to wait on data coming from the backend on the active socket (recvmsg command). Two mutexes (one of reads

[PATCH v2 04/13] xen/pvcalls: implement connect command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for the active socket. Introduce a data structure to keep track of sockets. Introduce a waitqueue to allow the frontend to wait on data coming from the backend on the active socket (recvmsg command). Two mutexes (one of reads

[PATCH v2 05/13] xen/pvcalls: implement bind command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_BIND to the backend. Introduce a new structure, part of struct sock_mapping, to store information specific to passive sockets. Introduce a status field to keep track of the status of the passive socket. Introduce a waitqueue for the "accept" command (see the accept command

[PATCH v2 05/13] xen/pvcalls: implement bind command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_BIND to the backend. Introduce a new structure, part of struct sock_mapping, to store information specific to passive sockets. Introduce a status field to keep track of the status of the passive socket. Introduce a waitqueue for the "accept" command (see the accept command

[PATCH v2 10/13] xen/pvcalls: implement poll command

2017-07-25 Thread Stefano Stabellini
For active sockets, check the indexes and use the inflight_conn_req waitqueue to wait. For passive sockets, send PVCALLS_POLL to the backend. Use the inflight_accept_req waitqueue if an accept is outstanding. Otherwise use the inflight_req waitqueue: inflight_req is awaken when a new response is

[PATCH v2 10/13] xen/pvcalls: implement poll command

2017-07-25 Thread Stefano Stabellini
For active sockets, check the indexes and use the inflight_conn_req waitqueue to wait. For passive sockets, send PVCALLS_POLL to the backend. Use the inflight_accept_req waitqueue if an accept is outstanding. Otherwise use the inflight_req waitqueue: inflight_req is awaken when a new response is

[PATCH v2 09/13] xen/pvcalls: implement recvmsg

2017-07-25 Thread Stefano Stabellini
Implement recvmsg by copying data from the "in" ring. If not enough data is available and the recvmsg call is blocking, then wait on the inflight_conn_req waitqueue. Take the active socket in_mutex so that only one function can access the ring at any given time. If not enough data is available on

[PATCH v2 09/13] xen/pvcalls: implement recvmsg

2017-07-25 Thread Stefano Stabellini
Implement recvmsg by copying data from the "in" ring. If not enough data is available and the recvmsg call is blocking, then wait on the inflight_conn_req waitqueue. Take the active socket in_mutex so that only one function can access the ring at any given time. If not enough data is available on

[PATCH v2 06/13] xen/pvcalls: implement listen command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_LISTEN to the backend. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-front.c | 48 + drivers/xen/pvcalls-front.h | 1 + 2 files changed, 49 insertions(+)

[PATCH v2 06/13] xen/pvcalls: implement listen command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_LISTEN to the backend. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-front.c | 48 + drivers/xen/pvcalls-front.h | 1 + 2 files changed, 49 insertions(+) diff --git

[PATCH v2 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend

2017-07-25 Thread Stefano Stabellini
Introduce a xenbus frontend for the pvcalls protocol, as defined by https://xenbits.xen.org/docs/unstable/misc/pvcalls.html. This patch only adds the stubs, the code will be added by the following patches. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC:

[PATCH v2 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend

2017-07-25 Thread Stefano Stabellini
Introduce a xenbus frontend for the pvcalls protocol, as defined by https://xenbits.xen.org/docs/unstable/misc/pvcalls.html. This patch only adds the stubs, the code will be added by the following patches. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com ---

[PATCH v2 11/13] xen/pvcalls: implement release command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_RELEASE to the backend and wait for a reply. Take both in_mutex and out_mutex to avoid concurrent accesses. Then, free the socket. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-front.c | 85

[PATCH v2 08/13] xen/pvcalls: implement sendmsg

2017-07-25 Thread Stefano Stabellini
Send data to an active socket by copying data to the "out" ring. Take the active socket out_mutex so that only one function can access the ring at any given time. If not enough room is available on the ring, rather than returning immediately or sleep-waiting, spin for up to 5000 cycles. This

[PATCH v2 11/13] xen/pvcalls: implement release command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_RELEASE to the backend and wait for a reply. Take both in_mutex and out_mutex to avoid concurrent accesses. Then, free the socket. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-front.c | 85

[PATCH v2 08/13] xen/pvcalls: implement sendmsg

2017-07-25 Thread Stefano Stabellini
Send data to an active socket by copying data to the "out" ring. Take the active socket out_mutex so that only one function can access the ring at any given time. If not enough room is available on the ring, rather than returning immediately or sleep-waiting, spin for up to 5000 cycles. This

[PATCH v2 07/13] xen/pvcalls: implement accept command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make sure that only one accept command is executed at any given time by setting PVCALLS_FLAG_ACCEPT_INFLIGHT and waiting on the inflight_accept_req waitqueue. sock->sk->sk_send_head is not used for ip sockets: reuse the field to

[PATCH v2 07/13] xen/pvcalls: implement accept command

2017-07-25 Thread Stefano Stabellini
Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make sure that only one accept command is executed at any given time by setting PVCALLS_FLAG_ACCEPT_INFLIGHT and waiting on the inflight_accept_req waitqueue. sock->sk->sk_send_head is not used for ip sockets: reuse the field to

[PATCH v2 12/13] xen/pvcalls: implement frontend disconnect

2017-07-25 Thread Stefano Stabellini
Implement pvcalls frontend removal function. Go through the list of active and passive sockets and free them all, one at a time. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrov...@oracle.com CC: jgr...@suse.com ---

[PATCH v2 12/13] xen/pvcalls: implement frontend disconnect

2017-07-25 Thread Stefano Stabellini
Implement pvcalls frontend removal function. Go through the list of active and passive sockets and free them all, one at a time. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-front.c | 28

[PATCH v2 13/13] xen: introduce a Kconfig option to enable the pvcalls frontend

2017-07-25 Thread Stefano Stabellini
Also add pvcalls-front to the Makefile. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/Kconfig | 9 + drivers/xen/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/xen/Kconfig

[PATCH v2 13/13] xen: introduce a Kconfig option to enable the pvcalls frontend

2017-07-25 Thread Stefano Stabellini
Also add pvcalls-front to the Makefile. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/Kconfig | 9 + drivers/xen/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index

[PATCH v2 00/13] introduce the Xen PV Calls frontend

2017-07-25 Thread Stefano Stabellini
Hi all, this series introduces the frontend for the newly introduced PV Calls procotol. PV Calls is a paravirtualized protocol that allows the implementation of a set of POSIX functions in a different domain. The PV Calls frontend sends POSIX function calls to the backend, which implements them

[PATCH v2 00/13] introduce the Xen PV Calls frontend

2017-07-25 Thread Stefano Stabellini
Hi all, this series introduces the frontend for the newly introduced PV Calls procotol. PV Calls is a paravirtualized protocol that allows the implementation of a set of POSIX functions in a different domain. The PV Calls frontend sends POSIX function calls to the backend, which implements them

[GIT PULL] (xen) stable/for-jens-4.13

2017-07-25 Thread Konrad Rzeszutek Wilk
Hi Jens, Please git pull in your branch "for-linus" the following branch which is based on 765e40b675a9566459ddcb8358ad16f3b8344bbe "blk-mq: map queues to all present CPUs": git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.13 It has two bug-fixes for the

[PATCH 3.18 52/60] drm/mst: Fix error handling during MST sideband message reception

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Imre Deak commit 448421b5e93b9177c5698f0cf6f5e72d2995eeca upstream. Handle any error due to partial reads, timeouts etc. to avoid parsing uninitialized data subsequently.

[GIT PULL] (xen) stable/for-jens-4.13

2017-07-25 Thread Konrad Rzeszutek Wilk
Hi Jens, Please git pull in your branch "for-linus" the following branch which is based on 765e40b675a9566459ddcb8358ad16f3b8344bbe "blk-mq: map queues to all present CPUs": git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.13 It has two bug-fixes for the

[PATCH 3.18 52/60] drm/mst: Fix error handling during MST sideband message reception

2017-07-25 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Imre Deak commit 448421b5e93b9177c5698f0cf6f5e72d2995eeca upstream. Handle any error due to partial reads, timeouts etc. to avoid parsing uninitialized data subsequently. Also bail out if the

[PATCH 4.4 00/83] 4.4.79-stable review

2017-07-25 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.79 release. There are 83 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Thu Jul 27 19:16:34 UTC 2017. Anything

[PATCH 4.4 00/83] 4.4.79-stable review

2017-07-25 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.79 release. There are 83 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Thu Jul 27 19:16:34 UTC 2017. Anything

[PATCH 4.4 04/83] thermal: cpu_cooling: Avoid accessing potentially freed structures

2017-07-25 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Viresh Kumar commit 289d72afddf83440117c35d864bf0c6309c1d011 upstream. After the lock is dropped, it is possible that the cpufreq_dev gets freed before we call

[PATCH 4.4 04/83] thermal: cpu_cooling: Avoid accessing potentially freed structures

2017-07-25 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Viresh Kumar commit 289d72afddf83440117c35d864bf0c6309c1d011 upstream. After the lock is dropped, it is possible that the cpufreq_dev gets freed before we call get_level() and that can cause

[PATCH 4.4 03/83] [media] s5p-jpeg: dont return a random width/height

2017-07-25 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Mauro Carvalho Chehab commit a16e37726c444cbda91e73ed5f742e717bfe866f upstream. Gcc 7.1 complains about: drivers/media/platform/s5p-jpeg/jpeg-core.c: In function

[PATCH 4.4 03/83] [media] s5p-jpeg: dont return a random width/height

2017-07-25 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Mauro Carvalho Chehab commit a16e37726c444cbda91e73ed5f742e717bfe866f upstream. Gcc 7.1 complains about: drivers/media/platform/s5p-jpeg/jpeg-core.c: In function 's5p_jpeg_parse_hdr.isra.9':

Re: [PATCH] mm, oom: allow oom reaper to race with exit_mmap

2017-07-25 Thread Andrea Arcangeli
On Tue, Jul 25, 2017 at 06:04:00PM +0200, Michal Hocko wrote: > - down_write(>mmap_sem); > + if (tsk_is_oom_victim(current)) > + down_write(>mmap_sem); > free_pgtables(, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); > tlb_finish_mmu(, 0, -1); > > @@ -3012,7

Re: [PATCH] mm, oom: allow oom reaper to race with exit_mmap

2017-07-25 Thread Andrea Arcangeli
On Tue, Jul 25, 2017 at 06:04:00PM +0200, Michal Hocko wrote: > - down_write(>mmap_sem); > + if (tsk_is_oom_victim(current)) > + down_write(>mmap_sem); > free_pgtables(, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); > tlb_finish_mmu(, 0, -1); > > @@ -3012,7

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-25 Thread Paul E. McKenney
On Tue, Jul 25, 2017 at 10:24:51PM +0200, Peter Zijlstra wrote: > On Tue, Jul 25, 2017 at 12:36:12PM -0700, Paul E. McKenney wrote: > > > There are a lot of variations, to be sure. For whatever it is worth, > > the original patch that started this uses mprotect(): > > > >

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-25 Thread Paul E. McKenney
On Tue, Jul 25, 2017 at 10:24:51PM +0200, Peter Zijlstra wrote: > On Tue, Jul 25, 2017 at 12:36:12PM -0700, Paul E. McKenney wrote: > > > There are a lot of variations, to be sure. For whatever it is worth, > > the original patch that started this uses mprotect(): > > > >

[PATCH 18/28] x86/intel_rdt: Prepare for RDT monitor data support

2017-07-25 Thread Vikas Shivappa
Rename the intel_rdt_schemata file to intel_rdt_ctrlmondata as we now want to add support for RDT monitoring data for the events that are supported in later patches. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/Makefile| 2 +-

[PATCH 16/28] x86/intel_rdt: Prepare to add RDT monitor cpus file support

2017-07-25 Thread Vikas Shivappa
Separate the ctrl cpus file handling from the generic cpus file handling and convert the per cpu closid from u32 to a struct which will be used later to add rmid to the same struct. Also cleanup some name space. Signed-off-by: Vikas Shivappa ---

[PATCH 18/28] x86/intel_rdt: Prepare for RDT monitor data support

2017-07-25 Thread Vikas Shivappa
Rename the intel_rdt_schemata file to intel_rdt_ctrlmondata as we now want to add support for RDT monitoring data for the events that are supported in later patches. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/Makefile| 2 +-

[PATCH 16/28] x86/intel_rdt: Prepare to add RDT monitor cpus file support

2017-07-25 Thread Vikas Shivappa
Separate the ctrl cpus file handling from the generic cpus file handling and convert the per cpu closid from u32 to a struct which will be used later to add rmid to the same struct. Also cleanup some name space. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt_sched.h | 4 +-

[PATCH 15/28] x86/intel_rdt/cqm: Add tasks file support

2017-07-25 Thread Vikas Shivappa
The root directory, ctrl_mon and monitor groups are populated with a read/write file named "tasks". When read, it shows all the task IDs assigned to the resource group. Tasks can be added to groups by writing the PID to the file. A task can be present in one "ctrl_mon" group "and" one "monitor"

[PATCH 13/28] x86/intel_rdt/cqm: Add mkdir support for RDT monitoring

2017-07-25 Thread Vikas Shivappa
Resource control groups can be created using mkdir in resctrl fs(rdtgroup). In order to extend the resctrl interface to support monitoring the control groups, extend the current mkdir to support resource monitoring also. This allows the rdtgroup created under the root directory to be able to both

[PATCH 13/28] x86/intel_rdt/cqm: Add mkdir support for RDT monitoring

2017-07-25 Thread Vikas Shivappa
Resource control groups can be created using mkdir in resctrl fs(rdtgroup). In order to extend the resctrl interface to support monitoring the control groups, extend the current mkdir to support resource monitoring also. This allows the rdtgroup created under the root directory to be able to both

[PATCH 15/28] x86/intel_rdt/cqm: Add tasks file support

2017-07-25 Thread Vikas Shivappa
The root directory, ctrl_mon and monitor groups are populated with a read/write file named "tasks". When read, it shows all the task IDs assigned to the resource group. Tasks can be added to groups by writing the PID to the file. A task can be present in one "ctrl_mon" group "and" one "monitor"

[PATCH 14/28] x86/intel_rdt: Change closid type from int to u32

2017-07-25 Thread Vikas Shivappa
OS associates a CLOSid(Class of service id) to a task by writing the high 32 bits of per CPU IA32_PQR_ASSOC MSR when a task is scheduled in. CPUID.(EAX=10H, ECX=1):EDX[15:0] enumerates the max CLOSID supported and it is zero indexed. Hence change the type to u32 from int. Signed-off-by: Vikas

[PATCH 14/28] x86/intel_rdt: Change closid type from int to u32

2017-07-25 Thread Vikas Shivappa
OS associates a CLOSid(Class of service id) to a task by writing the high 32 bits of per CPU IA32_PQR_ASSOC MSR when a task is scheduled in. CPUID.(EAX=10H, ECX=1):EDX[15:0] enumerates the max CLOSID supported and it is zero indexed. Hence change the type to u32 from int. Signed-off-by: Vikas

[PATCH 10/28] x86/intel_rdt: Simplify info and base file lists

2017-07-25 Thread Vikas Shivappa
From: Tony luck The info directory files and base files need to be different for each resource like cache and Memory bandwidth. With in each resource, the files would be further different for monitoring and ctrl. This leads to a lot of different static array declarations

[PATCH 11/28] x86/intel_rdt/cqm: Add info files for RDT monitoring

2017-07-25 Thread Vikas Shivappa
Add info directory files specific to RDT monitoring. num_rmids: The number of RMIDs which are valid for the resource. mon_features: Lists the monitoring events if monitoring is enabled for the resource. max_threshold_occupancy: This is specific to llc_occupancy monitoring and

[PATCH 10/28] x86/intel_rdt: Simplify info and base file lists

2017-07-25 Thread Vikas Shivappa
From: Tony luck The info directory files and base files need to be different for each resource like cache and Memory bandwidth. With in each resource, the files would be further different for monitoring and ctrl. This leads to a lot of different static array declarations given that we are adding

[PATCH 11/28] x86/intel_rdt/cqm: Add info files for RDT monitoring

2017-07-25 Thread Vikas Shivappa
Add info directory files specific to RDT monitoring. num_rmids: The number of RMIDs which are valid for the resource. mon_features: Lists the monitoring events if monitoring is enabled for the resource. max_threshold_occupancy: This is specific to llc_occupancy monitoring and

[PATCH 12/28] x86/intel_rdt: Prepare for RDT monitoring mkdir support

2017-07-25 Thread Vikas Shivappa
Separate the ctrl mkdir code from the rest in order to prepare for adding support for RDT monitoring mkdir support as well. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 112 ++- 1 file changed, 80

[PATCH 12/28] x86/intel_rdt: Prepare for RDT monitoring mkdir support

2017-07-25 Thread Vikas Shivappa
Separate the ctrl mkdir code from the rest in order to prepare for adding support for RDT monitoring mkdir support as well. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 112 ++- 1 file changed, 80 insertions(+), 32 deletions(-) diff

[PATCH 06/28] x86/intel_rdt: Cleanup namespace to support RDT monitoring

2017-07-25 Thread Vikas Shivappa
Few of the data-structures have generic names although they are RDT allocation specific. Rename them to be allocation specific to accommodate RDT monitoring. E.g. s/enabled/alloc_enabled/ No functional change. Signed-off-by: Vikas Shivappa ---

[PATCH 06/28] x86/intel_rdt: Cleanup namespace to support RDT monitoring

2017-07-25 Thread Vikas Shivappa
Few of the data-structures have generic names although they are RDT allocation specific. Rename them to be allocation specific to accommodate RDT monitoring. E.g. s/enabled/alloc_enabled/ No functional change. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt_sched.h | 4 ++--

[PATCH 08/28] x86/intel_rdt/cqm: Add RDT monitoring initialization

2017-07-25 Thread Vikas Shivappa
Add common data structures for RDT resource monitoring and perform RDT monitoring related data structure initializations which include setting up the RMID(Resource monitoring ID) lists and event list which the resource supports. [tony: some cleanup to make adding MBM easier later, remove "cqm"

[PATCH 09/28] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-25 Thread Vikas Shivappa
Hardware uses RMID(Resource monitoring ID) to keep track of each of the RDT events associated with tasks. The number of RMIDs is dependent on the SKU and is enumerated via CPUID. We add support to manage the RMIDs which include managing the RMID allocation and reading LLC occupancy for an RMID.

[PATCH 08/28] x86/intel_rdt/cqm: Add RDT monitoring initialization

2017-07-25 Thread Vikas Shivappa
Add common data structures for RDT resource monitoring and perform RDT monitoring related data structure initializations which include setting up the RMID(Resource monitoring ID) lists and event list which the resource supports. [tony: some cleanup to make adding MBM easier later, remove "cqm"

[PATCH 09/28] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-25 Thread Vikas Shivappa
Hardware uses RMID(Resource monitoring ID) to keep track of each of the RDT events associated with tasks. The number of RMIDs is dependent on the SKU and is enumerated via CPUID. We add support to manage the RMIDs which include managing the RMID allocation and reading LLC occupancy for an RMID.

[PATCH 02/28] x86/intel_rdt/cqm: Documentation for resctrl based RDT Monitoring

2017-07-25 Thread Vikas Shivappa
Add a description of resctrl based RDT(resource director technology) monitoring extension and its usage. [Tony: Added descriptions for how monitoring and allocation are measured and some cleanups] Signed-off-by: Tony Luck Signed-off-by: Vikas Shivappa

[PATCH 01/28] x86/perf/cqm: Wipe out perf based cqm

2017-07-25 Thread Vikas Shivappa
'perf cqm' never worked due to the incompatibility between perf infrastructure and cqm hardware support. The hardware uses RMIDs to track the llc occupancy of tasks and these RMIDs are per package. This makes monitoring a hierarchy like cgroup along with monitoring of tasks separately difficult

[PATCH 17/28] x86/intel_rdt/cqm: Add cpus file support

2017-07-25 Thread Vikas Shivappa
The cpus file is extended to support resource monitoring. This is used to over-ride the RMID of the default group when running on specific CPUs. It works similar to the resource control. The "cpus" and "cpus_list" file is present in default group, ctrl_mon groups and monitor groups. Each "cpus"

[PATCH 02/28] x86/intel_rdt/cqm: Documentation for resctrl based RDT Monitoring

2017-07-25 Thread Vikas Shivappa
Add a description of resctrl based RDT(resource director technology) monitoring extension and its usage. [Tony: Added descriptions for how monitoring and allocation are measured and some cleanups] Signed-off-by: Tony Luck Signed-off-by: Vikas Shivappa --- Documentation/x86/intel_rdt_ui.txt |

[PATCH 01/28] x86/perf/cqm: Wipe out perf based cqm

2017-07-25 Thread Vikas Shivappa
'perf cqm' never worked due to the incompatibility between perf infrastructure and cqm hardware support. The hardware uses RMIDs to track the llc occupancy of tasks and these RMIDs are per package. This makes monitoring a hierarchy like cgroup along with monitoring of tasks separately difficult

[PATCH 17/28] x86/intel_rdt/cqm: Add cpus file support

2017-07-25 Thread Vikas Shivappa
The cpus file is extended to support resource monitoring. This is used to over-ride the RMID of the default group when running on specific CPUs. It works similar to the resource control. The "cpus" and "cpus_list" file is present in default group, ctrl_mon groups and monitor groups. Each "cpus"

[PATCH 05/28] x86/intel_rdt: Mark rdt_root and closid_alloc as static

2017-07-25 Thread Vikas Shivappa
From: Reinette Chatre Sparse reports that both of these can be static. Make it so. Signed-off-by: Reinette Chatre Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 4 ++-- 1 file

[PATCH 22/28] x86/intel_rdt/cqm: Add mount,umount support

2017-07-25 Thread Vikas Shivappa
Add monitoring support during mount and unmount. Since root directory is a "ctrl_mon" directory which can control and monitor resources create the "mon_groups" directory which can hold monitor groups and a "mon_data" directory which would hold all monitoring data like the rest of resource groups.

[PATCH 05/28] x86/intel_rdt: Mark rdt_root and closid_alloc as static

2017-07-25 Thread Vikas Shivappa
From: Reinette Chatre Sparse reports that both of these can be static. Make it so. Signed-off-by: Reinette Chatre Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 22/28] x86/intel_rdt/cqm: Add mount,umount support

2017-07-25 Thread Vikas Shivappa
Add monitoring support during mount and unmount. Since root directory is a "ctrl_mon" directory which can control and monitor resources create the "mon_groups" directory which can hold monitor groups and a "mon_data" directory which would hold all monitoring data like the rest of resource groups.

[PATCH 21/28] x86/intel_rdt/cqm: Add rmdir support

2017-07-25 Thread Vikas Shivappa
Resource groups (ctrl_mon and monitor groups) are represented by directories in resctrl fs. Add support to remove the directories. When a ctrl_mon directory is removed all the cpus and tasks are assigned back to the root rdtgroup. When a monitor group is removed the cpus and tasks are returned to

[PATCH 21/28] x86/intel_rdt/cqm: Add rmdir support

2017-07-25 Thread Vikas Shivappa
Resource groups (ctrl_mon and monitor groups) are represented by directories in resctrl fs. Add support to remove the directories. When a ctrl_mon directory is removed all the cpus and tasks are assigned back to the root rdtgroup. When a monitor group is removed the cpus and tasks are returned to

[PATCH 19/28] x86/intel_rdt/cqm: Add mon_data

2017-07-25 Thread Vikas Shivappa
Add a mon_data directory for the root rdtgroup and all other rdtgroups. The directory holds all of the monitored data for all domains and events of all resources being monitored. The mon_data itself has a list of directories in the format mon__. Each of these subdirectories contain one file per

[PATCH 20/28] x86/intel_rdt: Separate the ctrl bits from rmdir

2017-07-25 Thread Vikas Shivappa
Re-factor the code to separate the ctrl group removal from the rmdir to prepare to add RDT monitoring group removal. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 48 ++-- 1 file changed, 33

[PATCH 19/28] x86/intel_rdt/cqm: Add mon_data

2017-07-25 Thread Vikas Shivappa
Add a mon_data directory for the root rdtgroup and all other rdtgroups. The directory holds all of the monitored data for all domains and events of all resources being monitored. The mon_data itself has a list of directories in the format mon__. Each of these subdirectories contain one file per

[PATCH 20/28] x86/intel_rdt: Separate the ctrl bits from rmdir

2017-07-25 Thread Vikas Shivappa
Re-factor the code to separate the ctrl group removal from the rmdir to prepare to add RDT monitoring group removal. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 48 ++-- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git

[PATCH 23/28] x86/intel_rdt: Introduce rdt_enable_key for scheduling

2017-07-25 Thread Vikas Shivappa
Introduce the usage of rdt_enable_key in sched_in code as a preparation to add RDT monitoring support for sched_in. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt_sched.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff

[PATCH 23/28] x86/intel_rdt: Introduce rdt_enable_key for scheduling

2017-07-25 Thread Vikas Shivappa
Introduce the usage of rdt_enable_key in sched_in code as a preparation to add RDT monitoring support for sched_in. Signed-off-by: Vikas Shivappa --- arch/x86/include/asm/intel_rdt_sched.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git

[PATCH 26/28] x86/intel_rdt/mbm: Basic counting of MBM events (total and local)

2017-07-25 Thread Vikas Shivappa
From: Tony Luck Check CPUID bits for whether each of the MBM events is supported. Allocate space for each RMID for each counter in each domain to save previous MSR counter value and running total of data. Create files in each of the monitor directories. Signed-off-by: Tony

[PATCH 26/28] x86/intel_rdt/mbm: Basic counting of MBM events (total and local)

2017-07-25 Thread Vikas Shivappa
From: Tony Luck Check CPUID bits for whether each of the MBM events is supported. Allocate space for each RMID for each counter in each domain to save previous MSR counter value and running total of data. Create files in each of the monitor directories. Signed-off-by: Tony Luck Signed-off-by:

[PATCH 25/28] x86/intel_rdt/cqm: Add hotcpu support

2017-07-25 Thread Vikas Shivappa
Resource groups have a per domain directory under "mon_data". Add or remove these directories as and when domains come online and go offline. Also update the per cpu rmids and cache upon onlining and offlining cpus. Signed-off-by: Vikas Shivappa ---

[PATCH 25/28] x86/intel_rdt/cqm: Add hotcpu support

2017-07-25 Thread Vikas Shivappa
Resource groups have a per domain directory under "mon_data". Add or remove these directories as and when domains come online and go offline. Also update the per cpu rmids and cache upon onlining and offlining cpus. Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 41

[PATCH 24/28] x86/intel_rdt/cqm: Add sched_in support

2017-07-25 Thread Vikas Shivappa
OS associates an RMID/CLOSid to a task by writing the per CPU IA32_PQR_ASSOC MSR when a task is scheduled in. The sched_in code will stay as no-op unless we are running on Intel SKU which supports either resource control or monitoring and we also enable them by mounting the resctrl fs. The per

[PATCH 24/28] x86/intel_rdt/cqm: Add sched_in support

2017-07-25 Thread Vikas Shivappa
OS associates an RMID/CLOSid to a task by writing the per CPU IA32_PQR_ASSOC MSR when a task is scheduled in. The sched_in code will stay as no-op unless we are running on Intel SKU which supports either resource control or monitoring and we also enable them by mounting the resctrl fs. The per

[PATCH 04/28] x86/intel_rdt: Change file names to accommodate RDT monitor code

2017-07-25 Thread Vikas Shivappa
Because the "perf cqm" and resctrl code were separately added and indivdually configurable, there seem to be separate context switch code and also things on global .h which are not really needed. Move only the scheduling specific code and definitions to and the put all the other declarations to

[PATCH 04/28] x86/intel_rdt: Change file names to accommodate RDT monitor code

2017-07-25 Thread Vikas Shivappa
Because the "perf cqm" and resctrl code were separately added and indivdually configurable, there seem to be separate context switch code and also things on global .h which are not really needed. Move only the scheduling specific code and definitions to and the put all the other declarations to

[PATCH 28/28] x86/intel_rdt/mbm: Handle counter overflow

2017-07-25 Thread Vikas Shivappa
Set up a delayed work queue for each domain that will read all the MBM counters of active RMIDs once per second to make sure that they don't wrap around between reads from users. [Tony: Added the initializations for the work structure and completed the patch] Signed-off-by: Tony Luck

[PATCH 28/28] x86/intel_rdt/mbm: Handle counter overflow

2017-07-25 Thread Vikas Shivappa
Set up a delayed work queue for each domain that will read all the MBM counters of active RMIDs once per second to make sure that they don't wrap around between reads from users. [Tony: Added the initializations for the work structure and completed the patch] Signed-off-by: Tony Luck

[PATCH 27/28] x86/intel_rdt/mbm: Add mbm counter initialization

2017-07-25 Thread Vikas Shivappa
MBM counters are monotonically increasing counts representing the total memory bytes at a particular time. In order to calculate total_bytes for an rdtgroup, we store the value of the counter when we create an rdtgroup or when a new domain comes online. When the total_bytes(all memory controller

[PATCH 27/28] x86/intel_rdt/mbm: Add mbm counter initialization

2017-07-25 Thread Vikas Shivappa
MBM counters are monotonically increasing counts representing the total memory bytes at a particular time. In order to calculate total_bytes for an rdtgroup, we store the value of the counter when we create an rdtgroup or when a new domain comes online. When the total_bytes(all memory controller

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