Re: [PATCH] proc: prevent accessing /proc//environ until it's ready

2016-04-28 Thread Mathias Krause
On 28 April 2016 at 23:26, Andrew Morton wrote: > On Thu, 28 Apr 2016 21:04:18 +0200 Mathias Krause > wrote: > >> If /proc//environ gets read before the envp[] array is fully set >> up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end

Re: [PATCH] proc: prevent accessing /proc//environ until it's ready

2016-04-28 Thread Mathias Krause
On 28 April 2016 at 23:26, Andrew Morton wrote: > On Thu, 28 Apr 2016 21:04:18 +0200 Mathias Krause > wrote: > >> If /proc//environ gets read before the envp[] array is fully set >> up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying >> to read more bytes than are actually

Re: cgroup namespace and user namespace interactions

2016-04-28 Thread Aleksa Sarai
> The new cgroup namespace currently only allows for superficial > interaction with the user namespace (it checks against the namespace > it was created in whether or not a user has the right capabilities > before allowing mounting, and things like that). However, there is one > glaring feature

Re: cgroup namespace and user namespace interactions

2016-04-28 Thread Aleksa Sarai
> The new cgroup namespace currently only allows for superficial > interaction with the user namespace (it checks against the namespace > it was created in whether or not a user has the right capabilities > before allowing mounting, and things like that). However, there is one > glaring feature

Re: [PATCH v2 4/9] of: Add bindings of hw throttle for soctherm

2016-04-28 Thread Wei Ni
On 2016年04月28日 22:48, Eduardo Valentin wrote: > On Thu, Apr 28, 2016 at 02:48:41PM +0800, Wei Ni wrote: >> >> >> On 2016年04月28日 07:30, Eduardo Valentin wrote: >>> From: Eduardo Valentin >>> To: Wei Ni >>> Cc: thierry.red...@gmail.com, robh...@kernel.org,

Re: [PATCH v2 4/9] of: Add bindings of hw throttle for soctherm

2016-04-28 Thread Wei Ni
On 2016年04月28日 22:48, Eduardo Valentin wrote: > On Thu, Apr 28, 2016 at 02:48:41PM +0800, Wei Ni wrote: >> >> >> On 2016年04月28日 07:30, Eduardo Valentin wrote: >>> From: Eduardo Valentin >>> To: Wei Ni >>> Cc: thierry.red...@gmail.com, robh...@kernel.org, rui.zh...@intel.com, >>>

Re: [PATCH v3 3/3] block: avoid to call .bi_end_io() recursively

2016-04-28 Thread Ming Lei
On Fri, Apr 29, 2016 at 12:59 AM, Mikulas Patocka wrote: > > > On Fri, 29 Apr 2016, Ming Lei wrote: > >> On Thu, Apr 28, 2016 at 11:58 PM, Mikulas Patocka >> wrote: >> > >> > >> > On Thu, 28 Apr 2016, Ming Lei wrote: >> > >> >> Hi Mikulas, >> >> >> >>

Re: [PATCH v3 3/3] block: avoid to call .bi_end_io() recursively

2016-04-28 Thread Ming Lei
On Fri, Apr 29, 2016 at 12:59 AM, Mikulas Patocka wrote: > > > On Fri, 29 Apr 2016, Ming Lei wrote: > >> On Thu, Apr 28, 2016 at 11:58 PM, Mikulas Patocka >> wrote: >> > >> > >> > On Thu, 28 Apr 2016, Ming Lei wrote: >> > >> >> Hi Mikulas, >> >> >> >> On Thu, Apr 28, 2016 at 11:29 PM, Mikulas

[git pull] drm fixes

2016-04-28 Thread Dave Airlie
Hi Linus, A few fixes all over the place: radeon is probably the biggest standout, it's a fix for screen corruption or hung black outputs so I thought it was worth pulling in. Otherwise some amdgpu power control fixes, some misc vmwgfx fixes, one etnaviv fix, one virtio-gpu fix, two DP MST

[git pull] drm fixes

2016-04-28 Thread Dave Airlie
Hi Linus, A few fixes all over the place: radeon is probably the biggest standout, it's a fix for screen corruption or hung black outputs so I thought it was worth pulling in. Otherwise some amdgpu power control fixes, some misc vmwgfx fixes, one etnaviv fix, one virtio-gpu fix, two DP MST

[PATCH] Use existing helper to convert "on/off" to boolean

2016-04-28 Thread Minfei Huang
It's more convenient to use existing function helper to convert string "on/off" to boolean. Signed-off-by: Minfei Huang --- lib/kstrtox.c| 2 +- mm/page_alloc.c | 9 + mm/page_poison.c | 8 +--- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git

[PATCH] Use existing helper to convert "on/off" to boolean

2016-04-28 Thread Minfei Huang
It's more convenient to use existing function helper to convert string "on/off" to boolean. Signed-off-by: Minfei Huang --- lib/kstrtox.c| 2 +- mm/page_alloc.c | 9 + mm/page_poison.c | 8 +--- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/lib/kstrtox.c

Re: [PATCH 1/2] zsmalloc: require GFP in zs_malloc()

2016-04-28 Thread Minchan Kim
On Fri, Apr 29, 2016 at 01:17:09AM +0900, Sergey Senozhatsky wrote: > Pass GFP flags to zs_malloc() instead of using a fixed set > (supplied during pool creation), so we can be more flexible, > but, more importantly, this will be need to switch zram to > per-cpu compression streams. > > Apart

Re: [PATCH 1/2] zsmalloc: require GFP in zs_malloc()

2016-04-28 Thread Minchan Kim
On Fri, Apr 29, 2016 at 01:17:09AM +0900, Sergey Senozhatsky wrote: > Pass GFP flags to zs_malloc() instead of using a fixed set > (supplied during pool creation), so we can be more flexible, > but, more importantly, this will be need to switch zram to > per-cpu compression streams. > > Apart

[PATCH] staging: rts5208: Avoid multiple assignment in one line

2016-04-28 Thread Manav Batra
Signed-off-by: Manav Batra Separates out assignment in one line to two lines. --- drivers/staging/rts5208/rtsx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index

[PATCH] staging: rts5208: Avoid multiple assignment in one line

2016-04-28 Thread Manav Batra
Signed-off-by: Manav Batra Separates out assignment in one line to two lines. --- drivers/staging/rts5208/rtsx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 25d095a..77c2580 100644 ---

Re: [PATCH] staging: rts5208: Avoid multiple assignment in one line

2016-04-28 Thread Greg KH
On Thu, Apr 28, 2016 at 10:30:49PM -0700, Manav Batra wrote: > Signed-off-by: Manav Batra I can't take patches without any changelog text :(

Re: [PATCH] staging: rts5208: Avoid multiple assignment in one line

2016-04-28 Thread Greg KH
On Thu, Apr 28, 2016 at 10:30:49PM -0700, Manav Batra wrote: > Signed-off-by: Manav Batra I can't take patches without any changelog text :(

Re: [PATCH] mm/zsmalloc: don't fail if can't create debugfs info

2016-04-28 Thread Minchan Kim
On Fri, Apr 29, 2016 at 09:38:24AM +0900, Sergey Senozhatsky wrote: > On (04/28/16 15:07), Andrew Morton wrote: > > Needed a bit of tweaking due to > > http://ozlabs.org/~akpm/mmotm/broken-out/zsmalloc-reordering-function-parameter.patch > > Thanks. > > > From: Dan Streetman

Re: [PATCH] mm/zsmalloc: don't fail if can't create debugfs info

2016-04-28 Thread Minchan Kim
On Fri, Apr 29, 2016 at 09:38:24AM +0900, Sergey Senozhatsky wrote: > On (04/28/16 15:07), Andrew Morton wrote: > > Needed a bit of tweaking due to > > http://ozlabs.org/~akpm/mmotm/broken-out/zsmalloc-reordering-function-parameter.patch > > Thanks. > > > From: Dan Streetman > > Subject:

[PATCH] staging: rts5208: Avoid multiple assignment in one line

2016-04-28 Thread Manav Batra
Signed-off-by: Manav Batra --- drivers/staging/rts5208/rtsx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 25d095a..77c2580 100644 --- a/drivers/staging/rts5208/rtsx.c +++

[PATCH] staging: rts5208: Avoid multiple assignment in one line

2016-04-28 Thread Manav Batra
Signed-off-by: Manav Batra --- drivers/staging/rts5208/rtsx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 25d095a..77c2580 100644 --- a/drivers/staging/rts5208/rtsx.c +++

[PATCH] staging: rts5208: Unnecessary parantheses around chip->sd_card

2016-04-28 Thread Manav Batra
Signed-off-by: Manav Batra --- drivers/staging/rts5208/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c index 87d6976..fbd2f90 100644 --- a/drivers/staging/rts5208/sd.c +++

[PATCH] staging: rts5208: Unnecessary parantheses around chip->sd_card

2016-04-28 Thread Manav Batra
Signed-off-by: Manav Batra --- drivers/staging/rts5208/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c index 87d6976..fbd2f90 100644 --- a/drivers/staging/rts5208/sd.c +++ b/drivers/staging/rts5208/sd.c @@

Re: [PATCH 1/2] staging: wilc1000: fix double unlock

2016-04-28 Thread Greg Kroah-Hartman
On Thu, Apr 14, 2016 at 08:48:48PM +0530, Sudip Mukherjee wrote: > The semaphore was being released twice, once at the beginning of the > thread and then again when the thread is about to close. > The semaphore is acquired immediately after creating the thread so we > should be releasing it when

Re: [PATCH 1/2] staging: wilc1000: fix double unlock

2016-04-28 Thread Greg Kroah-Hartman
On Thu, Apr 14, 2016 at 08:48:48PM +0530, Sudip Mukherjee wrote: > The semaphore was being released twice, once at the beginning of the > thread and then again when the thread is about to close. > The semaphore is acquired immediately after creating the thread so we > should be releasing it when

Re: [PATCH v6 3/7] perf record: Split output into multiple files via '--switch-output'

2016-04-28 Thread Wangnan (F)
On 2016/4/28 5:32, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 20, 2016 at 06:59:50PM +, Wang Nan escreveu: Allow 'perf record' to split its output into multiple files. For example: I squashed: -> 360 T 04/20 Wang Nan(1.7K) ├─>[PATCH v6 6/7] perf record: Re-synthesize

Re: random(4) changes

2016-04-28 Thread Stephan Mueller
Am Dienstag, 26. April 2016, 20:23:46 schrieb George Spelvin: Hi George, > > And considering that I only want to have 0.9 bits of entropy, why > > should I not collapse it? The XOR operation does not destroy the existing > > entropy, it only caps it to at most one bit of information theoretical

Re: [PATCH v6 3/7] perf record: Split output into multiple files via '--switch-output'

2016-04-28 Thread Wangnan (F)
On 2016/4/28 5:32, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 20, 2016 at 06:59:50PM +, Wang Nan escreveu: Allow 'perf record' to split its output into multiple files. For example: I squashed: -> 360 T 04/20 Wang Nan(1.7K) ├─>[PATCH v6 6/7] perf record: Re-synthesize

Re: random(4) changes

2016-04-28 Thread Stephan Mueller
Am Dienstag, 26. April 2016, 20:23:46 schrieb George Spelvin: Hi George, > > And considering that I only want to have 0.9 bits of entropy, why > > should I not collapse it? The XOR operation does not destroy the existing > > entropy, it only caps it to at most one bit of information theoretical

[PATCH 04/32] perf/x86/intel/cqm: make read of RMIDs per package (Temporal)

2016-04-28 Thread David Carrillo-Cisneros
The previous version of Intel's CQM introduced pmu::count as a replacement for reading CQM events. This was done to avoid using an IPI to read the CQM occupancy event when reading events attached to a thread. Using pmu->count in place of pmu->read is inconsistent with the usage by other PMUs and

[PATCH 05/32] perf/core: remove unused pmu->count

2016-04-28 Thread David Carrillo-Cisneros
CQM was the only user of pmu->count, no need to have it anymore. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- include/linux/perf_event.h | 6 -- kernel/events/core.c | 10 -- kernel/trace/bpf_trace.c | 5

[PATCH 07/32] perf/x86/intel/cqm: separate CQM PMU's attributes from x86 PMU

2016-04-28 Thread David Carrillo-Cisneros
Create a CQM_EVENT_ATTR_STR to use in CQM to remove dependency on the unrelated x86's PMU EVENT_ATTR_STR. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 17 - 1 file changed, 12

[PATCH 04/32] perf/x86/intel/cqm: make read of RMIDs per package (Temporal)

2016-04-28 Thread David Carrillo-Cisneros
The previous version of Intel's CQM introduced pmu::count as a replacement for reading CQM events. This was done to avoid using an IPI to read the CQM occupancy event when reading events attached to a thread. Using pmu->count in place of pmu->read is inconsistent with the usage by other PMUs and

[PATCH 05/32] perf/core: remove unused pmu->count

2016-04-28 Thread David Carrillo-Cisneros
CQM was the only user of pmu->count, no need to have it anymore. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- include/linux/perf_event.h | 6 -- kernel/events/core.c | 10 -- kernel/trace/bpf_trace.c | 5 ++--- 3 files changed, 2 insertions(+),

[PATCH 07/32] perf/x86/intel/cqm: separate CQM PMU's attributes from x86 PMU

2016-04-28 Thread David Carrillo-Cisneros
Create a CQM_EVENT_ATTR_STR to use in CQM to remove dependency on the unrelated x86's PMU EVENT_ATTR_STR. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git

[PATCH 08/32] perf/x86/intel/cqm: prepare for next patches

2016-04-28 Thread David Carrillo-Cisneros
Move code around, delete unnecesary code and do some renaming in in order to increase readibility of next patches. Create cqm.h file. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 170

[PATCH 08/32] perf/x86/intel/cqm: prepare for next patches

2016-04-28 Thread David Carrillo-Cisneros
Move code around, delete unnecesary code and do some renaming in in order to increase readibility of next patches. Create cqm.h file. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 170 +++-

[PATCH 11/32] perf/x86/intel/cqm: (I)state and limbo prmids

2016-04-28 Thread David Carrillo-Cisneros
CQM defines a dirty threshold that is the minimum number of dirty cache lines that a prmid can hold before being eligible to be reused. This threshold is zero unless there exist significant contention of prmids (more on this on the patch that introduces rotation of RMIDs). A limbo prmid is a

[PATCH 10/32] perf/x86/intel/cqm: basic RMID hierarchy with per package rmids

2016-04-28 Thread David Carrillo-Cisneros
Cgroups and/or tasks that require to be monitored using a RMID are abstracted as a MOnitored Resources (monr's). A CQM event points to a monr to read occupancy (and in the future other attributes) of the RMIDs associated to the monr. The monrs form a hierarchy that captures the dependency within

[PATCH 11/32] perf/x86/intel/cqm: (I)state and limbo prmids

2016-04-28 Thread David Carrillo-Cisneros
CQM defines a dirty threshold that is the minimum number of dirty cache lines that a prmid can hold before being eligible to be reused. This threshold is zero unless there exist significant contention of prmids (more on this on the patch that introduces rotation of RMIDs). A limbo prmid is a

[PATCH 10/32] perf/x86/intel/cqm: basic RMID hierarchy with per package rmids

2016-04-28 Thread David Carrillo-Cisneros
Cgroups and/or tasks that require to be monitored using a RMID are abstracted as a MOnitored Resources (monr's). A CQM event points to a monr to read occupancy (and in the future other attributes) of the RMIDs associated to the monr. The monrs form a hierarchy that captures the dependency within

[PATCH 17/32] perf/core: adding pmu::event_terminate

2016-04-28 Thread David Carrillo-Cisneros
Allow a PMU to clean an event before the event's torn down in perf_events begins. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- include/linux/perf_event.h | 6 ++ kernel/events/core.c | 4 2 files changed, 10

[PATCH 17/32] perf/core: adding pmu::event_terminate

2016-04-28 Thread David Carrillo-Cisneros
Allow a PMU to clean an event before the event's torn down in perf_events begins. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- include/linux/perf_event.h | 6 ++ kernel/events/core.c | 4 2 files changed, 10 insertions(+) diff --git

[PATCH 15/32] perf/core: add hooks to expose architecture specific features in perf_cgroup

2016-04-28 Thread David Carrillo-Cisneros
The hooks allows architectures to extend the behavior of the perf subsystem. In this patch series, the hooks will be used by Intel's CQM PMU to provide support for the llc_occupancy event. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros

[PATCH 16/32] perf/x86/intel/cqm: add cgroup support

2016-04-28 Thread David Carrillo-Cisneros
Create a monr per monitored cgroup. Inserts monrs in the monr hierarchy. Task events are leaves of the lowest monitored ancestor cgroup (the lowest cgroup ancestor with a monr). CQM starts after the cgroup subsystem, and uses the cqm_initialized_key static key to avoid interfering with the perf

[PATCH 15/32] perf/core: add hooks to expose architecture specific features in perf_cgroup

2016-04-28 Thread David Carrillo-Cisneros
The hooks allows architectures to extend the behavior of the perf subsystem. In this patch series, the hooks will be used by Intel's CQM PMU to provide support for the llc_occupancy event. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- include/linux/perf_event.h | 28

[PATCH 16/32] perf/x86/intel/cqm: add cgroup support

2016-04-28 Thread David Carrillo-Cisneros
Create a monr per monitored cgroup. Inserts monrs in the monr hierarchy. Task events are leaves of the lowest monitored ancestor cgroup (the lowest cgroup ancestor with a monr). CQM starts after the cgroup subsystem, and uses the cqm_initialized_key static key to avoid interfering with the perf

[PATCH 19/32] perf/core: introduce PMU event flag PERF_CGROUP_NO_RECURSION

2016-04-28 Thread David Carrillo-Cisneros
Some events, such as Intel's CQM llc_occupancy, need small deviations from the traditional behavior in the generic code in a way that depends on the event itself (and known by the PMU) and not in a field of perf_event_attrs. An example is the recursive scope for cgroups: The generic code handles

[PATCH 12/32] perf/x86/intel/cqm: add per-package RMID rotation

2016-04-28 Thread David Carrillo-Cisneros
This version of RMID rotation improves over original one by: 1. Being per-package. No need for IPIs to test for occupancy. 2. Since the monr hierarchy removed the potential conflicts between events, the new RMID rotation logic does not need to check and resolve conflicts. 3. No

[PATCH 19/32] perf/core: introduce PMU event flag PERF_CGROUP_NO_RECURSION

2016-04-28 Thread David Carrillo-Cisneros
Some events, such as Intel's CQM llc_occupancy, need small deviations from the traditional behavior in the generic code in a way that depends on the event itself (and known by the PMU) and not in a field of perf_event_attrs. An example is the recursive scope for cgroups: The generic code handles

[PATCH 12/32] perf/x86/intel/cqm: add per-package RMID rotation

2016-04-28 Thread David Carrillo-Cisneros
This version of RMID rotation improves over original one by: 1. Being per-package. No need for IPIs to test for occupancy. 2. Since the monr hierarchy removed the potential conflicts between events, the new RMID rotation logic does not need to check and resolve conflicts. 3. No

[PATCH 18/32] perf/x86/intel/cqm: use pmu::event_terminate

2016-04-28 Thread David Carrillo-Cisneros
Utilized to detach a monr from a cgroup before the event's reference to the cgroup is removed. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 16 +--- 1 file changed, 13 insertions(+), 3

[PATCH 18/32] perf/x86/intel/cqm: use pmu::event_terminate

2016-04-28 Thread David Carrillo-Cisneros
Utilized to detach a monr from a cgroup before the event's reference to the cgroup is removed. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH 24/32] perf/x86/intel/cqm: use PERF_INACTIVE_*_READ_* flags in CQM

2016-04-28 Thread David Carrillo-Cisneros
Use newly added pmu_event flags to: - Allow thread events to be read from any CPU even if not in ACTIVE state. Since inter-package values are polled, a thread's occupancy is always: local occupancy (read from hw) + remote occupancy (polled values) - Allow cpu/cgroup events to be read

[PATCH 13/32] perf/x86/intel/cqm: add polled update of RMID's llc_occupancy

2016-04-28 Thread David Carrillo-Cisneros
To avoid IPIs from IRQ disabled contexts, the occupancy for a RMID in a remote package (a package other than the one the current cpu belongs) is obtained from a cache that is periodically updated. This removes the need for an IPI when reading occupancy for a task event, that was the reason to add

[PATCH 23/32] perf/core: introduce PERF_INACTIVE_*_READ_* flags

2016-04-28 Thread David Carrillo-Cisneros
Some offcore and uncore events, such as the new intel_cqm/llc_occupancy, can be read even if the event is not active in its CPU (or in any CPU). In those cases, a freshly read value is more recent, (and therefore preferable) than the last value stored at event sched out. There are two cases

[PATCH 23/32] perf/core: introduce PERF_INACTIVE_*_READ_* flags

2016-04-28 Thread David Carrillo-Cisneros
Some offcore and uncore events, such as the new intel_cqm/llc_occupancy, can be read even if the event is not active in its CPU (or in any CPU). In those cases, a freshly read value is more recent, (and therefore preferable) than the last value stored at event sched out. There are two cases

[PATCH 24/32] perf/x86/intel/cqm: use PERF_INACTIVE_*_READ_* flags in CQM

2016-04-28 Thread David Carrillo-Cisneros
Use newly added pmu_event flags to: - Allow thread events to be read from any CPU even if not in ACTIVE state. Since inter-package values are polled, a thread's occupancy is always: local occupancy (read from hw) + remote occupancy (polled values) - Allow cpu/cgroup events to be read

[PATCH 13/32] perf/x86/intel/cqm: add polled update of RMID's llc_occupancy

2016-04-28 Thread David Carrillo-Cisneros
To avoid IPIs from IRQ disabled contexts, the occupancy for a RMID in a remote package (a package other than the one the current cpu belongs) is obtained from a cache that is periodically updated. This removes the need for an IPI when reading occupancy for a task event, that was the reason to add

[PATCH 20/32] x86/intel/cqm: use PERF_CGROUP_NO_RECURSION in CQM

2016-04-28 Thread David Carrillo-Cisneros
The CQM hardware is not compatible with the way generic code handles cgroup hierarchies (simultaneously adding the events of for all ancestors of the current cgroup). This version of Intel's CQM driver handles cgroup hierarchy internally. Set PERF_CGROUP_NO_RECURSION for llc_occupancy events to

[PATCH 21/32] perf/x86/intel/cqm: handle inherit event and inherit_stat flag

2016-04-28 Thread David Carrillo-Cisneros
Since inherited events are part of the same cqm cache group, they share the RMID and therefore they cannot provide the granularity required by inherit_stats. Changing this would require to create a subtree of monrs for each parent event and its inherited events, a potential improvement for future

[PATCH 20/32] x86/intel/cqm: use PERF_CGROUP_NO_RECURSION in CQM

2016-04-28 Thread David Carrillo-Cisneros
The CQM hardware is not compatible with the way generic code handles cgroup hierarchies (simultaneously adding the events of for all ancestors of the current cgroup). This version of Intel's CQM driver handles cgroup hierarchy internally. Set PERF_CGROUP_NO_RECURSION for llc_occupancy events to

[PATCH 21/32] perf/x86/intel/cqm: handle inherit event and inherit_stat flag

2016-04-28 Thread David Carrillo-Cisneros
Since inherited events are part of the same cqm cache group, they share the RMID and therefore they cannot provide the granularity required by inherit_stats. Changing this would require to create a subtree of monrs for each parent event and its inherited events, a potential improvement for future

[PATCH 32/32] perf/stat: revamp error handling for snapshot and per_pkg events

2016-04-28 Thread David Carrillo-Cisneros
A package wide event can return a valid read even if it has not run in a specific cpu, this does not fit well with the assumption that run == 0 is equivalent to a . To fix the problem, this patch defines special error values for val, run and ena (~0ULL), and use them to signal read errors,

[PATCH 29/32] perf,perf/x86,perf/powerpc,perf/arm,perf/*: add int error return to pmu::read

2016-04-28 Thread David Carrillo-Cisneros
New PMUs, such as CQM's, do not guarantee that a read will succeed even if pmu::add was successful. In the generic code, this patch adds an int error return and completes the error checking path up to perf_read(). In CQM's PMU, it adds proper error handling of hw read failure errors. In other

[PATCH 28/32] perf/x86/intel/cqm: add CQM attributes to perf_event cgroup

2016-04-28 Thread David Carrillo-Cisneros
Expose the boolean attribute intel_cqm.cont_monitoring . When set, the associated group will be monitored even if no perf cgroup event is attached to it. The occupancy of a cgroup must be read using a perf_event, regardless of the value of intel_cqm.cont_monitoring . Reviewed-by: Stephane

[PATCH 27/32] perf/core: add perf_event cgroup hooks for subsystem attributes

2016-04-28 Thread David Carrillo-Cisneros
Allow architectures to define additional attributes for the perf cgroup. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- include/linux/perf_event.h | 4 kernel/events/core.c | 2 ++ 2 files changed, 6 insertions(+)

[PATCH 28/32] perf/x86/intel/cqm: add CQM attributes to perf_event cgroup

2016-04-28 Thread David Carrillo-Cisneros
Expose the boolean attribute intel_cqm.cont_monitoring . When set, the associated group will be monitored even if no perf cgroup event is attached to it. The occupancy of a cgroup must be read using a perf_event, regardless of the value of intel_cqm.cont_monitoring . Reviewed-by: Stephane

[PATCH 27/32] perf/core: add perf_event cgroup hooks for subsystem attributes

2016-04-28 Thread David Carrillo-Cisneros
Allow architectures to define additional attributes for the perf cgroup. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- include/linux/perf_event.h | 4 kernel/events/core.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/linux/perf_event.h

[PATCH 32/32] perf/stat: revamp error handling for snapshot and per_pkg events

2016-04-28 Thread David Carrillo-Cisneros
A package wide event can return a valid read even if it has not run in a specific cpu, this does not fit well with the assumption that run == 0 is equivalent to a . To fix the problem, this patch defines special error values for val, run and ena (~0ULL), and use them to signal read errors,

[PATCH 29/32] perf,perf/x86,perf/powerpc,perf/arm,perf/*: add int error return to pmu::read

2016-04-28 Thread David Carrillo-Cisneros
New PMUs, such as CQM's, do not guarantee that a read will succeed even if pmu::add was successful. In the generic code, this patch adds an int error return and completes the error checking path up to perf_read(). In CQM's PMU, it adds proper error handling of hw read failure errors. In other

[PATCH 30/32] perf,perf/x86: add hook perf_event_arch_exec

2016-04-28 Thread David Carrillo-Cisneros
perf_event context switches events to newly exec'ed tasks using perf_event_exec. Add a hook for such path. In x86, perf_event_arch_exec is used to synchronize the software cache of the PQR_ASSOC msr, setting the right RMID for the new task. Reviewed-by: Stephane Eranian

[PATCH 31/32] perf/stat: fix bug in handling events in error state

2016-04-28 Thread David Carrillo-Cisneros
From: Stephane Eranian When an event is in error state, read() returns 0 instead of sizeof() buffer. In certain modes, such as interval printing, ignoring the 0 return value may cause bogus count deltas to be computed and thus invalid results printed. this patch fixes this

[PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-28 Thread David Carrillo-Cisneros
Allow monitored cgroups to update the PQR MSR during task switch even without an associated perf_event. The package RMID for the current monr associated with a monitored cgroup is written to hw during task switch (after perf_events is run) if perf_event did not write a RMID for an event.

[PATCH 25/32] sched: introduce the finish_arch_pre_lock_switch() scheduler hook

2016-04-28 Thread David Carrillo-Cisneros
This hook allows architecture specific code to be called at the end of the task switch and after perf_events' context switch but before the scheduler lock is released. The specific use case in this series is to avoid multiple writes to a slow MSR until all functions which modify such register in

[PATCH 30/32] perf,perf/x86: add hook perf_event_arch_exec

2016-04-28 Thread David Carrillo-Cisneros
perf_event context switches events to newly exec'ed tasks using perf_event_exec. Add a hook for such path. In x86, perf_event_arch_exec is used to synchronize the software cache of the PQR_ASSOC msr, setting the right RMID for the new task. Reviewed-by: Stephane Eranian Signed-off-by: David

[PATCH 31/32] perf/stat: fix bug in handling events in error state

2016-04-28 Thread David Carrillo-Cisneros
From: Stephane Eranian When an event is in error state, read() returns 0 instead of sizeof() buffer. In certain modes, such as interval printing, ignoring the 0 return value may cause bogus count deltas to be computed and thus invalid results printed. this patch fixes this problem by modifying

[PATCH 26/32] perf/x86/intel/cqm: integrate CQM cgroups with scheduler

2016-04-28 Thread David Carrillo-Cisneros
Allow monitored cgroups to update the PQR MSR during task switch even without an associated perf_event. The package RMID for the current monr associated with a monitored cgroup is written to hw during task switch (after perf_events is run) if perf_event did not write a RMID for an event.

[PATCH 25/32] sched: introduce the finish_arch_pre_lock_switch() scheduler hook

2016-04-28 Thread David Carrillo-Cisneros
This hook allows architecture specific code to be called at the end of the task switch and after perf_events' context switch but before the scheduler lock is released. The specific use case in this series is to avoid multiple writes to a slow MSR until all functions which modify such register in

[PATCH 09/32] perf/x86/intel/cqm: add per-package RMIDs, data and locks

2016-04-28 Thread David Carrillo-Cisneros
First part of new CQM logic. This patch introduces the struct pkg_data that contains all per-package CQM data required by the new RMID hierarchy. The raw RMID value is encapsulated in a Package RMID (prmid) structure that provides atomic updates and caches recent reads. This caching throttles the

[PATCH 03/32] perf/x86/intel/cqm: remove all code for rotation of RMIDs

2016-04-28 Thread David Carrillo-Cisneros
In preparation for future patches that will introduce a per-package rotation of RMIDs. The new rotation logic follows the same ideas as the present rotation logic being removed but takes advantage of the per-package RMID design and a more detailed bookkeeping to guarantee to meet user SLOs. It

[PATCH 09/32] perf/x86/intel/cqm: add per-package RMIDs, data and locks

2016-04-28 Thread David Carrillo-Cisneros
First part of new CQM logic. This patch introduces the struct pkg_data that contains all per-package CQM data required by the new RMID hierarchy. The raw RMID value is encapsulated in a Package RMID (prmid) structure that provides atomic updates and caches recent reads. This caching throttles the

[PATCH 03/32] perf/x86/intel/cqm: remove all code for rotation of RMIDs

2016-04-28 Thread David Carrillo-Cisneros
In preparation for future patches that will introduce a per-package rotation of RMIDs. The new rotation logic follows the same ideas as the present rotation logic being removed but takes advantage of the per-package RMID design and a more detailed bookkeeping to guarantee to meet user SLOs. It

[PATCH 22/32] perf/x86/intel/cqm: introduce read_subtree

2016-04-28 Thread David Carrillo-Cisneros
Read RMIDs llc_occupancy for cgroups by adding the occupancy of all pmonrs with a read_rmid along its subtree in the pmonr hierarchy for the event's package. The RMID to read for a monr is the same as its RMID to schedule in hw if the monr is in (A)state. If in (IL)state, the RMID to read is that

[PATCH 02/32] perf/x86/intel/cqm: remove check for conflicting events

2016-04-28 Thread David Carrillo-Cisneros
The new version of Intel's CQM uses a RMID hierarchy to avoid conflicts between cpu, cgroup and task events, making unnecessary to check and resolve conflicts between events of different types (ie. cgroup vs task). Reviewed-by: Stephane Eranian Signed-off-by: David

[PATCH 06/32] x86/intel,cqm: add CONFIG_INTEL_RDT configuration flag and refactor PQR

2016-04-28 Thread David Carrillo-Cisneros
Add Intel's PQR as its own build target, remove its build dependency on CQM, and add CONFIG_INTEL_RDT as a configuration flag to build PQR and all of its related drivers (currently CQM, future: MBM, CAT, CDP). Reviewed-by: Stephane Eranian Signed-off-by: David

[PATCH 14/32] perf/x86/intel/cqm: add preallocation of anodes

2016-04-28 Thread David Carrillo-Cisneros
Pre-allocate enough anodes to be able to at least hold one set of RMIDs per package before running out of anodes. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 10 ++ 1 file changed, 10

[PATCH 22/32] perf/x86/intel/cqm: introduce read_subtree

2016-04-28 Thread David Carrillo-Cisneros
Read RMIDs llc_occupancy for cgroups by adding the occupancy of all pmonrs with a read_rmid along its subtree in the pmonr hierarchy for the event's package. The RMID to read for a monr is the same as its RMID to schedule in hw if the monr is in (A)state. If in (IL)state, the RMID to read is that

[PATCH 02/32] perf/x86/intel/cqm: remove check for conflicting events

2016-04-28 Thread David Carrillo-Cisneros
The new version of Intel's CQM uses a RMID hierarchy to avoid conflicts between cpu, cgroup and task events, making unnecessary to check and resolve conflicts between events of different types (ie. cgroup vs task). Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros ---

[PATCH 06/32] x86/intel,cqm: add CONFIG_INTEL_RDT configuration flag and refactor PQR

2016-04-28 Thread David Carrillo-Cisneros
Add Intel's PQR as its own build target, remove its build dependency on CQM, and add CONFIG_INTEL_RDT as a configuration flag to build PQR and all of its related drivers (currently CQM, future: MBM, CAT, CDP). Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros ---

[PATCH 14/32] perf/x86/intel/cqm: add preallocation of anodes

2016-04-28 Thread David Carrillo-Cisneros
Pre-allocate enough anodes to be able to at least hold one set of RMIDs per package before running out of anodes. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros --- arch/x86/events/intel/cqm.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH 01/32] perf/x86/intel/cqm: temporarily remove MBM from CQM and cleanup

2016-04-28 Thread David Carrillo-Cisneros
Removing MBM code from arch/x86/events/intel/cqm.c. MBM will be added using the new RMID infrastucture introduced in this patch series. Also, remove updates to CQM that are superseded by this series. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros

[PATCH 01/32] perf/x86/intel/cqm: temporarily remove MBM from CQM and cleanup

2016-04-28 Thread David Carrillo-Cisneros
Removing MBM code from arch/x86/events/intel/cqm.c. MBM will be added using the new RMID infrastucture introduced in this patch series. Also, remove updates to CQM that are superseded by this series. Reviewed-by: Stephane Eranian Signed-off-by: David Carrillo-Cisneros ---

[PATCH 00/32] 2nd Iteration of Cache QoS Monitoring support.

2016-04-28 Thread David Carrillo-Cisneros
This series introduces the next iteration of kernel support for the Cache QoS Monitoring (CQM) technology available in Intel Xeon processors. One of the main limitations of the previous version is the inability to simultaneously monitor: 1) cpu event and any other event in that cpu. 2) cgroup

Re: [RFC PATCH V2 2/2] vhost: device IOTLB API

2016-04-28 Thread Jason Wang
On 04/29/2016 09:12 AM, Jason Wang wrote: > On 04/28/2016 10:43 PM, Michael S. Tsirkin wrote: >> > On Thu, Apr 28, 2016 at 02:37:16PM +0800, Jason Wang wrote: >>> >> >>> >> On 04/27/2016 07:45 PM, Michael S. Tsirkin wrote: >>> On Fri, Mar 25, 2016 at 10:34:34AM +0800, Jason Wang wrote:

Re: [RFC PATCH V2 2/2] vhost: device IOTLB API

2016-04-28 Thread Jason Wang
On 04/29/2016 09:12 AM, Jason Wang wrote: > On 04/28/2016 10:43 PM, Michael S. Tsirkin wrote: >> > On Thu, Apr 28, 2016 at 02:37:16PM +0800, Jason Wang wrote: >>> >> >>> >> On 04/27/2016 07:45 PM, Michael S. Tsirkin wrote: >>> On Fri, Mar 25, 2016 at 10:34:34AM +0800, Jason Wang wrote:

[PATCH 00/32] 2nd Iteration of Cache QoS Monitoring support.

2016-04-28 Thread David Carrillo-Cisneros
This series introduces the next iteration of kernel support for the Cache QoS Monitoring (CQM) technology available in Intel Xeon processors. One of the main limitations of the previous version is the inability to simultaneously monitor: 1) cpu event and any other event in that cpu. 2) cgroup

Re: [PATCH v7 22/24] [media] rtl2832: change the i2c gate to be mux-locked

2016-04-28 Thread Peter Rosin
On 2016-04-28 23:47, Wolfram Sang wrote: > On Wed, Apr 20, 2016 at 05:18:02PM +0200, Peter Rosin wrote: >> The root i2c adapter lock is then no longer held by the i2c mux during >> accesses behind the i2c gate, and such accesses need to take that lock >> just like any other ordinary i2c accesses

Re: [PATCH v7 22/24] [media] rtl2832: change the i2c gate to be mux-locked

2016-04-28 Thread Peter Rosin
On 2016-04-28 23:47, Wolfram Sang wrote: > On Wed, Apr 20, 2016 at 05:18:02PM +0200, Peter Rosin wrote: >> The root i2c adapter lock is then no longer held by the i2c mux during >> accesses behind the i2c gate, and such accesses need to take that lock >> just like any other ordinary i2c accesses

  1   2   3   4   5   6   7   8   9   10   >