Re: [PATCH v2 05/11] powerpc: add hv_gpci interface header

2014-02-25 Thread Cody P Schafer
On 02/24/2014 07:33 PM, Michael Ellerman wrote: On Fri, 2014-14-02 at 22:02:09 UTC, Cody P Schafer wrote: "H_GetPerformanceCounterInfo" (refered to as hv_gpci or just gpci from here on) is an interface to retrieve specific performance counters and other data from the hypervisor. A

Re: [PATCH v2 01/11] perf: add PMU_RANGE_ATTR() helper for use by sw-like pmus

2014-02-25 Thread Cody P Schafer
On 02/24/2014 07:33 PM, Michael Ellerman wrote: On Fri, 2014-14-02 at 22:02:05 UTC, Cody P Schafer wrote: Add PMU_RANGE_ATTR() and PMU_RANGE_RESV() (for reserved areas) which generate functions to extract the relevent bits from event->attr.config{,1,2} for use by sw-like pmus where the 

[PATCH] powerpc: warn users of smt-snooze-delay that the API isn't there anymore

2014-02-21 Thread Cody P Schafer
move into the cpuidle driver, essentially by adjusting target_residency to the specified value. At the moment, target_residency is not exposed by cpuidle's sysfs, so there isn't a drop in replacement for this. Signed-off-by: Cody P Schafer --- arch/powerpc/kernel/sysfs.c | 6 ++ 1 fi

Re: [PATCH v2.1 9/11] powerpc/perf: add kconfig option for hypervisor provided counters

2014-02-20 Thread Cody P Schafer
Whoops, should be "[Patch v2.1 10/11]" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH v2.1 9/11] powerpc/perf: add kconfig option for hypervisor provided counters

2014-02-20 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/pseries/Kconfig | 12 2 files changed, 14 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc

Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters

2014-02-17 Thread Cody P Schafer
On 02/16/2014 11:11 PM, Michael Ellerman wrote: On Fri, 2014-02-14 at 16:25 -0800, Cody P Schafer wrote: On Fri, Feb 14, 2014 at 04:32:13PM -0600, Scott Wood wrote: On Fri, 2014-02-14 at 14:02 -0800, Cody P Schafer wrote: diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc

Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters

2014-02-14 Thread Cody P Schafer
On Fri, Feb 14, 2014 at 04:32:13PM -0600, Scott Wood wrote: > On Fri, 2014-02-14 at 14:02 -0800, Cody P Schafer wrote: > > Signed-off-by: Cody P Schafer > > --- > > arch/powerpc/perf/Makefile | 2 ++ > > arch/powerpc/platforms/Kconfig.cputype | 6 +++

[PATCH v2 03/11] sysfs: create bin_attributes under the requested group

2014-02-14 Thread Cody P Schafer
shows that no one is using bin_attrs in a named attribute group yet, so we can do this without breaking anything in usespace. Note that I do not add is_visible() support to bin_attributes, though that could be done as well. Signed-off-by: Cody P Schafer --- fs/sysfs/group.c | 7 +-- 1 file

[PATCH v2 01/11] perf: add PMU_RANGE_ATTR() helper for use by sw-like pmus

2014-02-14 Thread Cody P Schafer
Add PMU_RANGE_ATTR() and PMU_RANGE_RESV() (for reserved areas) which generate functions to extract the relevent bits from event->attr.config{,1,2} for use by sw-like pmus where the 'config{,1,2}' values don't map directly to hardware registers. Signed-off-by: Cody P Schafer

[PATCH v2 04/11] powerpc: add hvcalls for 24x7 and gpci (get performance counter info)

2014-02-14 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/include/asm/hvcall.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index d8b600b..652f7e4 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm

[PATCH v2 00/11] powerpc: Add support for Power Hypervisor supplied performance counters

2014-02-14 Thread Cody P Schafer
beled) - provide and event_24x7_request() that wraps single_24x7_request() - probably some other small fixes I'm forgetting. Cody P Schafer (11): perf: add PMU_RANGE_ATTR() helper for use by sw-like pmus perf core: export swevent hrtimer helpers sysfs: create bin_attributes under the

[PATCH v2 09/11] powerpc/perf: add support for the hv 24x7 interface

2014-02-14 Thread Cody P Schafer
This provides a basic interface between hv_24x7 and perf. Similar to the one provided for gpci, it lacks transaction support and does not list any events. Signed-off-by: Cody P Schafer --- arch/powerpc/perf/hv-24x7.c | 491 1 file changed, 491

[PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters

2014-02-14 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..f9c083a 100644 --- a/arch/powerpc/perf

[PATCH v2 11/11] powerpc/perf/hv_{gpci,24x7}: add documentation of device attributes

2014-02-14 Thread Cody P Schafer
gpci and 24x7 expose some device specific attributes. Add some documentation for them. Signed-off-by: Cody P Schafer --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 22 +++ .../testing/sysfs-bus-event_source-devices-hv_gpci | 43 ++ 2 files changed, 65

[PATCH v2 08/11] powerpc/perf: add support for the hv gpci (get performance counter info) interface

2014-02-14 Thread Cody P Schafer
This provides a basic link between perf and hv_gpci. Notably, it does not yet support transactions and does not list any events (they can still be manually composed). Signed-off-by: Cody P Schafer --- arch/powerpc/perf/hv-gpci.c | 290 1 file changed

[PATCH v2 07/11] powerpc: add a shared interface to get gpci version and capabilities

2014-02-14 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/perf/hv-common.c | 39 +++ arch/powerpc/perf/hv-common.h | 17 + 2 files changed, 56 insertions(+) create mode 100644 arch/powerpc/perf/hv-common.c create mode 100644 arch/powerpc/perf/hv

[PATCH v2 06/11] powerpc: add 24x7 interface header

2014-02-14 Thread Cody P Schafer
er). This method of obtaining performance counters from the hypervisor is intended to paritialy replace the gpci interface. Signed-off-by: Cody P Schafer --- arch/powerpc/perf/hv-24x7.h | 239 1 file changed, 239 insertions(+) create mode 100644 ar

[PATCH v2 05/11] powerpc: add hv_gpci interface header

2014-02-14 Thread Cody P Schafer
"H_GetPerformanceCounterInfo" (refered to as hv_gpci or just gpci from here on) is an interface to retrieve specific performance counters and other data from the hypervisor. All outputs have a fixed format (and are represented as structs in this patch). Signed-off-by: Cody P Schafer

[PATCH v2 02/11] perf core: export swevent hrtimer helpers

2014-02-14 Thread Cody P Schafer
Export the swevent hrtimer helpers currently only used in events/core.c to allow the addition of architecture specific sw-like pmus. Signed-off-by: Cody P Schafer --- include/linux/perf_event.h | 5 - kernel/events/core.c | 8 2 files changed, 8 insertions(+), 5 deletions

Re: [PATCH 4/8] powerpc: add hv_gpci interface header

2014-02-05 Thread Cody P Schafer
diff --git a/arch/powerpc/include/asm/hv_gpci.h b/arch/powerpc/include/asm/hv_gpci.h Any reason this can't just live in arch/powerpc/perf ? Nope, it should be able to keep the header there for now. As this interface allows determination of the HW topology, we may have some code that expo

Re: [PATCH 4/8] powerpc: add hv_gpci interface header

2014-02-03 Thread Cody P Schafer
On 01/31/2014 09:58 PM, Michael Ellerman wrote: On Thu, 2014-16-01 at 23:53:50 UTC, Cody P Schafer wrote: "H_GetPerformanceCounterInfo" (refered to as hv_gpci or just gpci from here on) is an interface to retrieve specific performance counters and other data from the hypervisor. A

Re: [PATCH 3/8] powerpc: add hvcalls for 24x7 and gpci (get performance counter info)

2014-02-03 Thread Cody P Schafer
On 01/31/2014 09:58 PM, Michael Ellerman wrote: On Thu, 2014-16-01 at 23:53:49 UTC, Cody P Schafer wrote: Signed-off-by: Cody P Schafer --- arch/powerpc/include/asm/hvcall.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/hvcall.h b/arch

Re: [PATCH 1/8] perf: add PMU_RANGE_ATTR() helper for use by sw-like pmus

2014-02-03 Thread Cody P Schafer
On 01/31/2014 09:58 PM, Michael Ellerman wrote: On Thu, 2014-16-01 at 23:53:47 UTC, Cody P Schafer wrote: Add PMU_RANGE_ATTR() and PMU_RANGE_RESV() (for reserved areas) which generate functions to extract the relevent bits from event->attr.config{,1,2} for use by sw-like pmus where the 

Re: [PATCH 6/8] powerpc/perf: add support for the hv gpci (get performance counter info) interface

2014-02-03 Thread Cody P Schafer
On 01/31/2014 09:58 PM, Michael Ellerman wrote: On Thu, 2014-16-01 at 23:53:52 UTC, Cody P Schafer wrote: This provides a basic link between perf and hv_gpci. Notably, it does not yet support transactions and does not list any events (they can still be manually composed). What are the plans

Re: [PATCH 0/8] Add support for PowerPC Hypervisor supplied performance counters

2014-01-31 Thread Cody P Schafer
On 01/22/2014 04:11 PM, Cody P Schafer wrote: On 01/21/2014 05:32 PM, Michael Ellerman wrote: On Thu, 2014-01-16 at 15:53 -0800, Cody P Schafer wrote: These patches add basic pmus for 2 powerpc hypervisor interfaces to obtain performance counters: gpci ("get performance counter info"

Re: [PATCH 0/8] Add support for PowerPC Hypervisor supplied performance counters

2014-01-22 Thread Cody P Schafer
On 01/21/2014 05:32 PM, Michael Ellerman wrote: > On Thu, 2014-01-16 at 15:53 -0800, Cody P Schafer wrote: >> These patches add basic pmus for 2 powerpc hypervisor interfaces to obtain >> performance counters: gpci ("get performance counter info") and 24x7. >> &g

[PATCH 0/8] Add support for PowerPC Hypervisor supplied performance counters

2014-01-16 Thread Cody P Schafer
lly do not generate any interrupts. This makes them in some regards similar to software counters, and as a result their implimentation shares some common code (which an initial patch exposes) with the sw counters. There is ongoing work to support transactions for each of these pmus. Cody P Schafer (

[PATCH 2/8] perf core: export swevent hrtimer helpers

2014-01-16 Thread Cody P Schafer
Export the swevent hrtimer helpers currently only used in events/core.c to allow the addition of architecture specific sw-like pmus. Signed-off-by: Cody P Schafer --- include/linux/perf_event.h | 5 - kernel/events/core.c | 8 2 files changed, 8 insertions(+), 5 deletions

[PATCH 4/8] powerpc: add hv_gpci interface header

2014-01-16 Thread Cody P Schafer
"H_GetPerformanceCounterInfo" (refered to as hv_gpci or just gpci from here on) is an interface to retrieve specific performance counters and other data from the hypervisor. All outputs have a fixed format (and are represented as structs in this patch). Signed-off-by: Cody P Schafer

[PATCH 7/8] powerpc/perf: add support for the hv 24x7 interface

2014-01-16 Thread Cody P Schafer
This provides a basic interface between hv_24x7 and perf. Similar to the one provided for gpci, it lacks transaction support and does not list any events. Signed-off-by: Cody P Schafer --- arch/powerpc/perf/hv-24x7.c | 354 1 file changed, 354

[PATCH 5/8] powerpc: add 24x7 interface header

2014-01-16 Thread Cody P Schafer
er). This method of obtaining performance counters from the hypervisor is intended to paritialy replace the gpci interface. Signed-off-by: Cody P Schafer --- arch/powerpc/include/asm/hv_24x7.h | 239 + 1 file changed, 239 insertions(+) create mode 100644 ar

[PATCH 3/8] powerpc: add hvcalls for 24x7 and gpci (get performance counter info)

2014-01-16 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/include/asm/hvcall.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index d8b600b..48d6efa 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch

[PATCH 6/8] powerpc/perf: add support for the hv gpci (get performance counter info) interface

2014-01-16 Thread Cody P Schafer
This provides a basic link between perf and hv_gpci. Notably, it does not yet support transactions and does not list any events (they can still be manually composed). Signed-off-by: Cody P Schafer --- arch/powerpc/perf/hv-gpci.c | 235 1 file changed

[PATCH 8/8] powerpc/perf: add kconfig option for hypervisor provided counters

2014-01-16 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- arch/powerpc/perf/Makefile | 2 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile index 60d71ee..5e5fcd2 100644 --- a/arch/powerpc/perf

[PATCH 1/8] perf: add PMU_RANGE_ATTR() helper for use by sw-like pmus

2014-01-16 Thread Cody P Schafer
Add PMU_RANGE_ATTR() and PMU_RANGE_RESV() (for reserved areas) which generate functions to extract the relevent bits from event->attr.config{,1,2} for use by sw-like pmus where the 'config{,1,2}' values don't map directly to hardware registers. Signed-off-by: Cody P Schafer

[tip:perf/core] tools perf: Comment typo fix

2014-01-14 Thread tip-bot for Cody P Schafer
Commit-ID: 88aca8d966a1349631a0946ed77c7ed360519ed4 Gitweb: http://git.kernel.org/tip/88aca8d966a1349631a0946ed77c7ed360519ed4 Author: Cody P Schafer AuthorDate: Wed, 8 Jan 2014 08:43:51 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 13 Jan 2014 10:06:24 -0300 tools perf

Re: [PATCH 2/3] perf: clarify comment regarding event merging

2014-01-13 Thread Cody P Schafer
On 01/10/2014 01:36 AM, Peter Zijlstra wrote: On Thu, Jan 09, 2014 at 03:51:31PM -0800, Cody P Schafer wrote: There are actually 2 things about software events that allow us to merge them: they never fail to schedule _and_ they have transaction handlers we can (and do, when they are added to

[PATCH 2/3] perf: clarify comment regarding event merging

2014-01-09 Thread Cody P Schafer
There are actually 2 things about software events that allow us to merge them: they never fail to schedule _and_ they have transaction handlers we can (and do, when they are added to !sw groups) ignore. Note both of these in the comment on adding sw events to !sw groups. Signed-off-by: Cody P

[PATCH 3/3] perf: clarify comment regarding perf_pmu_contexts

2014-01-09 Thread Cody P Schafer
Again, note that the behavior of task_ctx_nr < 0 is an exception. Signed-off-by: Cody P Schafer --- kernel/events/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index e9f60d0..159ef12 100644 --- a/kernel/events/cor

[PATCH 1/3] perf: comment on usage of perf_invalid_context

2014-01-09 Thread Cody P Schafer
Context numbers less than 0 are treated specially within the events code, add a comment to document this. Signed-off-by: Cody P Schafer --- include/linux/sched.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index 53f97eb..f574820 100644

[PATCH 0/3] perf: note task_ctx_nr < 0 and sw event merging behavior

2014-01-09 Thread Cody P Schafer
These patches only add/adjust comments. Cody P Schafer (3): perf: comment on usage of perf_invalid_context perf: clarify comment regarding event merging perf: clarify comment regarding perf_pmu_contexts include/linux/sched.h | 4 kernel/events/core.c | 8 +--- 2 files changed, 9

[PATCH] tool/perf: comment typo fix

2014-01-08 Thread Cody P Schafer
s/temr/term/ Signed-off-by: Cody P Schafer --- tools/perf/util/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index c232d8d..1f760a9 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -406,7 +406,7 @@ static

Re: [PATCH v2 01/11] rbtree: Fix rbtree_postorder_for_each_entry_safe() iterator

2013-11-07 Thread Cody P Schafer
On 11/07/2013 01:38 PM, Andrew Morton wrote: On Wed, 6 Nov 2013 17:42:30 -0800 Cody P Schafer wrote: The iterator rbtree_postorder_for_each_entry_safe() relies on pointer underflow behavior when testing for loop termination. In particular it expects that &rb_entry(NULL, type, f

Re: [PATCH v2 01/11] rbtree: Fix rbtree_postorder_for_each_entry_safe() iterator

2013-11-07 Thread Cody P Schafer
On 11/07/2013 03:51 AM, Michel Lespinasse wrote: On Wed, Nov 6, 2013 at 5:42 PM, Cody P Schafer wrote: From: Jan Kara [...] +#define rb_entry_safe(ptr, type, member) \ + ({ typeof(ptr) ptr = (ptr); \ + ptr ? rb_entry(ptr, type, member) : NULL

[PATCH v2 06/11] fs/ubifs: use rbtree postorder iteration helper instead of opencoding

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/ubifs/debug.c| 22 +++--- fs/ubifs/log.c | 21 ++--- fs/ubifs/orphan.c

[PATCH v2 10/11] mtd/ubi: use rbtree postorder iteration helper instead of opencoding

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- drivers/mtd/ubi/attach.c | 49 +++- drivers/mtd/ubi/wl.c | 25

[PATCH v2 11/11] sh/dwarf: use rbtree postorder iteration helper instead of solution using repeated rb_erase()

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of using repeated rb_erase() calls Signed-off-by: Cody P Schafer --- arch/sh/kernel/dwarf.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel

[PATCH v2 04/11] net ipset: use rbtree postorder iteration instead of opencoding

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- net/netfilter/ipset/ip_set_hash_netiface.c | 27 --- 1 file changed, 4 insertions(+), 23

[PATCH v2 00/11] rbtree: postorder iteration: fix, add tests, and use in various places

2013-11-06 Thread Cody P Schafer
New in v2: 1: Jan Kara's fix for rbtree_postorder_for_each_entry_safe() for when gcc tries to optimize it. 2,3: test the above mentioned macro and reorder the test struct to catch anther class of errors. Unchanged from v1: 4-11: use the postorder_for_each() in various locations. -- C

[PATCH v2 07/11] fs/ext4: use rbtree postorder iteration helper instead of opencoding

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/ext4/block_validity.c | 33 - fs/ext4/dir.c| 35

[PATCH v2 08/11] fs/jffs2: use rbtree postorder iteration helper instead of opencoding

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/jffs2/nodelist.c | 28 ++-- fs/jffs2/readinode.c | 26 +++--- 2 files

[PATCH v2 09/11] fs/ext3: use rbtree postorder iteration helper instead of opencoding

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/ext3/dir.c | 36 +--- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git

[PATCH v2 02/11] rbtree/test: move rb_node to the middle of the test struct

2013-11-06 Thread Cody P Schafer
Avoid making the rb_node the first entry to catch some bugs around NULL checking the rb_node. Signed-off-by: Cody P Schafer --- lib/rbtree_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 31dd4cc..df6c125 100644 --- a/lib

[PATCH v2 01/11] rbtree: Fix rbtree_postorder_for_each_entry_safe() iterator

2013-11-06 Thread Cody P Schafer
ome gcc versions (e.g. 4.3.4) assume the above expression can never be equal to NULL. The net result is an oops because the iteration is not properly terminated. Fix the problem by modifying the iterator to avoid pointer underflows. Signed-off-by: Jan Kara Signed-off-by: Cody P Schafer --- includ

[PATCH v2 05/11] trace/trace_stat: use rbtree postorder iteration helper instead of opencoding

2013-11-06 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- kernel/trace/trace_stat.c | 42 ++ 1 file changed, 6 insertions(+), 36

[PATCH v2 03/11] rbtree/test: test rbtree_postorder_for_each_entry_safe()

2013-11-06 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- lib/rbtree_test.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index df6c125..8b3c9dc 100644 --- a/lib/rbtree_test.c +++ b/lib/rbtree_test.c @@ -114,6 +114,16 @@ static int black_path_count(struct rb_node

[PATCH] rbtree/test: test rbtree_postorder_for_each_entry_safe()

2013-11-06 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- lib/rbtree_test.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index df6c125..8b3c9dc 100644 --- a/lib/rbtree_test.c +++ b/lib/rbtree_test.c @@ -114,6 +114,16 @@ static int black_path_count(struct rb_node

Re: [PATCH 1/2] rbtree: fix postorder iteration when the rb_node is not the first element in an entry

2013-11-06 Thread Cody P Schafer
On 11/05/2013 02:56 PM, Jan Kara wrote: On Tue 05-11-13 22:57:55, Jan Kara wrote: >On Tue 05-11-13 02:05:44, Cody P Schafer wrote: > >On 11/04/2013 05:40 PM, Cody P Schafer wrote: > > >Provide a new helper called rb_next_postorder_entry() to perform NULL > >

Re: [PATCH 1/2] rbtree: fix postorder iteration when the rb_node is not the first element in an entry

2013-11-05 Thread Cody P Schafer
On 11/04/2013 05:40 PM, Cody P Schafer wrote: > Provide a new helper called rb_next_postorder_entry() to perform NULL > checks and container_of() coversions and use it in > rbtree_for_each_entry_safe() to fix oopses that occur when rb_node is > not the first element in the entry

[PATCH 2/2] rbtree/test: move rb_node to the middle of the test struct

2013-11-04 Thread Cody P Schafer
Avoid making the rb_node the first entry to catch some bugs around NULL checking the rb_node. Signed-off-by: Cody P Schafer --- lib/rbtree_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 31dd4cc..df6c125 100644 --- a/lib

[PATCH 1/2] rbtree: fix postorder iteration when the rb_node is not the first element in an entry

2013-11-04 Thread Cody P Schafer
(). Signed-off-by: Cody P Schafer --- include/linux/rbtree.h | 20 +++- lib/rbtree.c | 2 -- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index aa870a4..630eedb 100644 --- a/include/linux/rbtree.h +++ b

Re: [PATCH 6/8] fs/ext3: use rbtree postorder iteration helper instead of opencoding

2013-11-04 Thread Cody P Schafer
On 11/04/2013 04:45 PM, Jan Kara wrote: On Mon 04-11-13 15:26:38, Jan Kara wrote: On Fri 01-11-13 15:38:50, Cody P Schafer wrote: Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Thanks. I&#x

Re: [PATCH 2/8] trace/trace_stat: use rbtree postorder iteration helper instead of opencoding

2013-11-04 Thread Cody P Schafer
On 11/01/2013 07:45 PM, Steven Rostedt wrote: On Fri, 1 Nov 2013 15:38:46 -0700 Cody P Schafer wrote: Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- kernel

[PATCH 2/8] trace/trace_stat: use rbtree postorder iteration helper instead of opencoding

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- kernel/trace/trace_stat.c | 42 ++ 1 file changed, 6 insertions(+), 36

[PATCH 3/8] fs/ubifs: use rbtree postorder iteration helper instead of opencoding

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/ubifs/debug.c| 22 +++--- fs/ubifs/log.c | 21 ++--- fs/ubifs/orphan.c

[PATCH 4/8] fs/ext4: use rbtree postorder iteration helper instead of opencoding

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/ext4/block_validity.c | 33 - fs/ext4/dir.c| 35

[PATCH 1/8] net ipset: use rbtree postorder iteration instead of opencoding

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- net/netfilter/ipset/ip_set_hash_netiface.c | 27 --- 1 file changed, 4 insertions(+), 23

[PATCH 6/8] fs/ext3: use rbtree postorder iteration helper instead of opencoding

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/ext3/dir.c | 36 +--- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git

[PATCH 8/8] sh/dwarf: use rbtree postorder iteration helper instead of solution using repeated rb_erase()

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of using repeated rb_erase() calls Signed-off-by: Cody P Schafer --- arch/sh/kernel/dwarf.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel

[PATCH 7/8] mtd/ubi: use rbtree postorder iteration helper instead of opencoding

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- drivers/mtd/ubi/attach.c | 49 +++- drivers/mtd/ubi/wl.c | 25

[PATCH 5/8] fs/jffs2: use rbtree postorder iteration helper instead of opencoding

2013-11-01 Thread Cody P Schafer
Use rbtree_postorder_for_each_entry_safe() to destroy the rbtree instead of opencoding an alternate postorder iteration that modifies the tree Signed-off-by: Cody P Schafer --- fs/jffs2/nodelist.c | 28 ++-- fs/jffs2/readinode.c | 26 +++--- 2 files

[PATCH] bitops/find: clarify and extend documentation

2013-10-25 Thread Cody P Schafer
Add return value documentation and clarify the units of the @size parameter. Signed-off-by: Cody P Schafer --- include/asm-generic/bitops/find.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops

[PATCH] ftrace: open tracer when ftrace_dump_on_oops is used

2013-10-23 Thread Cody P Schafer
o function names. call trace->open() (and do a few other fixups copied from the normal dump path) to make the output more intelligible. Signed-off-by: Cody P Schafer --- kernel/trace/trace.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/

Re: [PATCHv4 02/10] mm: convert mm->nr_ptes to atomic_t

2013-09-27 Thread Cody P Schafer
On 09/27/2013 06:16 AM, Kirill A. Shutemov wrote: With split page table lock for PMD level we can't hold mm->page_table_lock while updating nr_ptes. Let's convert it to atomic_t to avoid races. --- diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 84e0c56e1e..99f19e85

Re: [PATCH] mm/mempolicy: use NUMA_NO_NODE

2013-09-16 Thread Cody P Schafer
@@ -1802,11 +1802,11 @@ static inline unsigned interleave_nid(struct mempolicy *pol, /* * Return the bit number of a random bit set in the nodemask. - * (returns -1 if nodemask is empty) + * (returns NUMA_NO_NOD if nodemask is empty) s/NUMA_NO_NOD/NUMA_NO_NODE/ */ int node_random

Re: [RFC][PATCH] mm: percpu pages: up batch size to fix arithmetic?? errror

2013-09-11 Thread Cody P Schafer
On 09/11/2013 04:08 PM, Cody P Schafer wrote: On 09/11/2013 03:08 PM, Dave Hansen wrote: I really don't know where the: batch /= 4; /* We effectively *= 4 below */ ... batch = rounddown_pow_of_two(batch + batch/2) - 1; came from. The round down code at *MOST* d

Re: [RFC][PATCH] mm: percpu pages: up batch size to fix arithmetic?? errror

2013-09-11 Thread Cody P Schafer
On 09/11/2013 03:08 PM, Dave Hansen wrote: I really don't know where the: batch /= 4; /* We effectively *= 4 below */ ... batch = rounddown_pow_of_two(batch + batch/2) - 1; came from. The round down code at *MOST* does a *= 1.5, but *averages* out to be just

Re: [RFC][PATCH] drivers: base: dynamic memory block creation

2013-08-14 Thread Cody P Schafer
On 08/14/2013 02:14 PM, Seth Jennings wrote: >An existing tool would not work >with this patch (plus boot option) since it would not know how to >show/hide things. It lets_part_ of those existing tools get reused >since they only have to be taught how to show/hide things. > >I'd find this reall

Re: [PATCH v2] mm: make lru_add_drain_all() selective

2013-08-07 Thread Cody P Schafer
On 08/06/2013 01:22 PM, Chris Metcalf wrote: [...] /** + * schedule_on_each_cpu - execute a function synchronously on each online CPU + * @func: the function to call + * + * schedule_on_each_cpu() executes @func on each online CPU using the + * system workqueue and blocks until all CPUs have

Re: [PATCH] mm/hotplug: fix a drain pcp bug when offline pages

2013-08-01 Thread Cody P Schafer
On 08/01/2013 02:18 AM, Xishi Qiu wrote: __offline_pages() start_isolate_page_range() set_migratetype_isolate() set_pageblock_migratetype() -> this pageblock will be marked as MIGRATE_ISOLATE move_freepages_block() -> pages in PageBuddy will be moved into MIGRATE_

[PATCH v2 4/5] rbtree: allow tests to run as builtin

2013-07-29 Thread Cody P Schafer
No reason require rbtree test code to be a module, allow it to be builtin (streamlines my development process) Signed-off-by: Cody P Schafer Reviewed-by: Seth Jennings --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib

[PATCH v2 2/5] rbtree: add rbtree_postorder_for_each_entry_safe() helper

2013-07-29 Thread Cody P Schafer
Because deletion (of the entire tree) is a relatively common use of the rbtree_postorder iteration, and because doing it safely means fiddling with temporary storage, provide a helper to simplify postorder rbtree iteration. Signed-off-by: Cody P Schafer Reviewed-by: Seth Jennings --- include

[PATCH v2 0/5] Add rbtree postorder iteration functions, runtime tests, and update zswap to use

2013-07-29 Thread Cody P Schafer
ree runtime tests 4 allows building the rbtree runtime tests as builtins 5 updates zswap. -- since v1: - spacing - s/it's/its/ - remove now unused var in zswap code. - Reviewed-by: Seth Jennings Cody P Schafer (5): rbtree: add postorder iteration

[PATCH v2 3/5] rbtree_test: add test for postorder iteration

2013-07-29 Thread Cody P Schafer
Just check that we examine all nodes in the tree for the postorder iteration. Signed-off-by: Cody P Schafer Reviewed-by: Seth Jennings --- lib/rbtree_test.c | 12 1 file changed, 12 insertions(+) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 122f02f..31dd4cc 100644

[PATCH v2 1/5] rbtree: add postorder iteration functions

2013-07-29 Thread Cody P Schafer
Add postorder iteration functions for rbtree. These are useful for safely freeing an entire rbtree without modifying the tree at all. Signed-off-by: Cody P Schafer Reviewed-by: Seth Jennings --- include/linux/rbtree.h | 4 lib/rbtree.c | 40

[PATCH v2 5/5] mm/zswap: use postorder iteration when destroying rbtree

2013-07-29 Thread Cody P Schafer
Signed-off-by: Cody P Schafer Reviewed-by: Seth Jennings --- mm/zswap.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index deda2b6..5c853b2 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -790,26 +790,14 @@ static void

Re: [PATCH 2/5] rbtree: add rbtree_postorder_for_each_entry_safe() helper

2013-07-29 Thread Cody P Schafer
On 07/29/2013 08:06 AM, Seth Jennings wrote: On Fri, Jul 26, 2013 at 02:13:40PM -0700, Cody P Schafer wrote: Because deletion (of the entire tree) is a relatively common use of the rbtree_postorder iteration, and because doing it safely means fiddling with temporary storage, provide a helper to

Re: [PATCH 1/5] rbtree: add postorder iteration functions

2013-07-29 Thread Cody P Schafer
On 07/29/2013 08:01 AM, Seth Jennings wrote: On Fri, Jul 26, 2013 at 02:13:39PM -0700, Cody P Schafer wrote: diff --git a/lib/rbtree.c b/lib/rbtree.c index c0e31fe..65f4eff 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c @@ -518,3 +518,43 @@ void rb_replace_node(struct rb_node *victim, struct

[PATCH 1/5] rbtree: add postorder iteration functions

2013-07-26 Thread Cody P Schafer
Add postorder iteration functions for rbtree. These are useful for safely freeing an entire rbtree without modifying the tree at all. Signed-off-by: Cody P Schafer --- include/linux/rbtree.h | 4 lib/rbtree.c | 40 2 files changed, 44

[PATCH 2/5] rbtree: add rbtree_postorder_for_each_entry_safe() helper

2013-07-26 Thread Cody P Schafer
Because deletion (of the entire tree) is a relatively common use of the rbtree_postorder iteration, and because doing it safely means fiddling with temporary storage, provide a helper to simplify postorder rbtree iteration. Signed-off-by: Cody P Schafer --- include/linux/rbtree.h | 17

[PATCH 4/5] rbtree: allow tests to run as builtin

2013-07-26 Thread Cody P Schafer
No reason require rbtree test code to be a module, allow it to be builtin (streamlines my development process) Signed-off-by: Cody P Schafer --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1501aa5..606e3c8

[PATCH 0/5] Add rbtree postorder iteration functions, runtime tests, and update zswap to use.

2013-07-26 Thread Cody P Schafer
ode (most notably in the filesystem drivers) use a hand rolled postorder iteration that NULLs child links as it traverses the tree. Each of those instances could be replaced with this common implementation. Cody P Schafer (5): rbtree: add postorder iteration func

[PATCH 5/5] mm/zswap: use postorder iteration when destroying rbtree

2013-07-26 Thread Cody P Schafer
Signed-off-by: Cody P Schafer --- mm/zswap.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index deda2b6..98d99c4 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -791,25 +791,14 @@ static void zswap_frontswap_invalidate_area(unsigned

[PATCH 3/5] rbtree_test: add test for postorder iteration

2013-07-26 Thread Cody P Schafer
Just check that we examine all nodes in the tree for the postorder iteration. Signed-off-by: Cody P Schafer --- lib/rbtree_test.c | 12 1 file changed, 12 insertions(+) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 122f02f..31dd4cc 100644 --- a/lib/rbtree_test.c +++ b

Re: [PATCH 13/21] x86, acpi: Try to find SRAT in firmware earlier.

2013-07-23 Thread Cody P Schafer
On 07/19/2013 12:59 AM, Tang Chen wrote: This patch introduce early_acpi_firmware_srat() to find the phys addr of SRAT provided by firmware. And call it in reserve_hotpluggable_memory(). Since we have initialized acpi_gbl_root_table_list earlier, and store all the tables' phys addrs and signatur

Re: [PATCH v4 net-next] net: poll/select low latency socket support

2013-06-27 Thread Cody P Schafer
On 06/27/2013 05:25 PM, Cody P Schafer wrote: On 06/24/2013 12:28 AM, Eliezer Tamir wrote: select/poll busy-poll support. ... I'm seeing warnings about using smp_processor_id() while preemptable (log included below) due to this patch. I expect the use of ll_end_time() -> sched_clock()

Re: [PATCH v4 net-next] net: poll/select low latency socket support

2013-06-27 Thread Cody P Schafer
On 06/24/2013 12:28 AM, Eliezer Tamir wrote: select/poll busy-poll support. ... diff --git a/fs/select.c b/fs/select.c index 8c1c96c..79b876e 100644 --- a/fs/select.c +++ b/fs/select.c @@ -400,6 +402,8 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time) poll_table *wai

Re: [PATCH] mm/page_alloc: don't re-init pageset in zone_pcp_update()

2013-06-12 Thread Cody P Schafer
stem state) from zone_pageset_init() and using the new pageset_set_high_and_batch() instead of zone_pageset_init() in zone_pcp_update(). Signed-off-by: Cody P Schafer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majo

Re: [PATCH] mm/page_alloc: don't re-init pageset in zone_pcp_update()

2013-06-12 Thread Cody P Schafer
On 06/12/2013 02:20 PM, Andrew Morton wrote: On Tue, 11 Jun 2013 15:12:59 -0700 Cody P Schafer wrote: Factor pageset_set_high_and_batch() (which contains all needed logic too set a pageset's ->high and ->batch inrespective of system state) out of zone_pageset_init(), which avoids

[PATCH] mm/page_alloc: don't re-init pageset in zone_pcp_update()

2013-06-11 Thread Cody P Schafer
some funky allocations would be the result) when memory hotplug is triggered. Signed-off-by: Cody P Schafer --- Unless memory hotplug is being triggered on boot, this should *not* be cause of Valdis Kletnieks' reported bug in -next: "next-20130607 BUG: Bad page state in proce

<    1   2   3   4   5   >