g 0 symbols does not cause it
to consider itself loaded, and do not set long_name in such a case.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 90d2760..9e31
erf symbol: use both runtime and debug images"
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index f8fbde2..83d2276 100644
--- a/
dso__set_long_name() is already called by dso__load_vmlinux(), avoid
calling it a second time unnecessarily.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
Prelink only adjusts the addresses of non-zero symbols. Do the same when
we reverse the adjustments.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b2f7597
fixed in libelf/elfutils.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 9e31cbb..6afc92d 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -973,6
a .opd section exsists, it is contained in the highest priority
image with a dynsym section.
- This generally implies that the debug image lacks a dynsym section
(ie: it is marked as NO_BITS).
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 82 +++---
ype as well).
Setup for later patch
"perf symbol: use both runtime and debug images"
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index
Previously dso__synthesize_plt_symbols() was reopening the elf file to
obtain dynsyms from it. Rather than reopen the file, use the already
opened reference within the symsrc to access it.
Setup for the later patch
"perf symbol: use both runtime and debug images"
Signed-off-by: Cody
ymbol creation (kallsyms__parse() is not in general used to create
symbols).
Signed-off-by: Cody P Schafer
---
tools/perf/util/event.c | 2 +-
tools/perf/util/symbol.c | 21 ++---
tools/perf/util/symbol.h | 2 +-
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/
I guess that length of 1 effectively same as zero length in this case
since we end up calling symbols__fixup_end. The 'end - start + 1' part
looks like a leftover from previous change and not needed anymore -
KSYM_NAME_LEN check too, IMHO - so I suggest using 0 length to make it
clear.
Got it.
1-4,6,7 are small cleanups.
5 fixes a potential segfault.
8 fixes a use after free for dso->long_name
9 avoids a segfault in elfutils when a truncated elf is loaded.
10 properly tracks that a dso had symbols loaded from a vmlinux image
11-16 fix handling of the '.opd' section in the presence o
y, start & end define an inclusive range.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index f02de8a..891f83c 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/
ype as well).
Setup for later patch
"perf symbol: use both runtime and debug images"
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol-elf.c | 2 ++
tools/perf/util/symbol.c | 13 +++--
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/symb
Previously dso__synthesize_plt_symbols() was reopening the elf file to
obtain dynsyms from it. Rather than reopen the file, use the already
opened reference within the symsrc to access it.
Setup for the later patch
"perf symbol: use both runtime and debug images"
Signed-off-by: Cody
exists in the
runtime image) is the same in both the runtime and debug/symbols
image.
Both of these are true on RHEL, but it is unclear how accurate they are
in general (on platforms with function descriptors in opd sections).
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol-
fixed in libelf/elfutils.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol-elf.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index a2e994e..a9a194d 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol
Previously, symtab_type would have been left at 0, or KALLSYMS, which is not
quite accurate.
Introduce DSO_SYMTAB_TYPE__VMLINUX[_GUEST].
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 9 +
tools/perf/util/symbol.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a
duplicate code for looking up the same sections and checking for
the existence of an important section wouldn't be as clean (and we need
to keep the Elf stuff confined to symtab-elf.c).
Utilized by the later patch
"perf symbol: use both runtime and debug images"
Signed-off-by: Cod
dso__set_long_name() is already called by dso__load_vmlinux(), avoid
calling it a second time unnecessarily.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
f a .opd section exists, it is contained in the highest priority
image with a dynsym section.
- This generally implies that the debug image lacks a dynsym section
(ie: it is marked as NO_BITS).
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol-elf.c | 5 +++
tools/perf/util/symbol-m
g 0 symbols does not cause it
to consider itself loaded, and do not set long_name in such a case.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index e5c3817..96db
If .dynsym exists but .dynstr is empty (NO_BITS or size==0), a segfault
occurs. Avoid this by checking that .dynstr is not empty.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol-elf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util
Prelink only adjusts the addresses of non-zero symbols. Do the same when
we reverse the adjustments.
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol-elf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
ymbol creation (kallsyms__parse() is not in general used to create
symbols).
Signed-off-by: Cody P Schafer
---
tools/perf/util/event.c | 2 +-
tools/perf/util/symbol.c | 21 ++---
tools/perf/util/symbol.h | 2 +-
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/
erf symbol: use both runtime and debug images"
Signed-off-by: Cody P Schafer
---
tools/perf/util/symbol-elf.c | 21 ++---
tools/perf/util/symbol-minimal.c | 8 ++--
tools/perf/util/symbol.c | 10 +++---
tools/perf/util/symbol.h | 3 ++-
4 fi
The only site that jumps to out_fixup has (kallsyms_filename == NULL).
And all paths that reach 'if (err > 0)' without 'goto out_fixup' have
kallsyms_filename != NULL.
So skip over both the check & dso__set_long_name(), and remove the
check.
Signed-off-by: Cody P Sc
map__objdump_2ip was introduced in:
ee11b90b12 perf top: Fix annotate for userspace
And it's last user removed in:
36532461a0 perf top: Ditch private annotation code, share perf annotate's
Remove it.
Signed-off-by: Cody P Schafer
---
tools/perf/util/map.c | 8
tools/perf/
(Sorry Mel, you're getting this twice because I forgot CC's last time)
On 01/10/2013 03:36 AM, Mel Gorman wrote:
Any particular reason you did not use scripts/gfp-translate?
Because I didn't look hard enough & didn't see it :(
Script is dumb as rocks, requires access to the source code and do
Summaries:
01 - removes the use of zone_end_pfn as a local var name.
02 - adds zone_end_pfn(), zone_is_initialized(), zone_is_empty() and
zone_spans_pfn()
03 - adds a VM_BUG using zone_is_initialized() in __free_one_page()
04 - add ensure_zone_is_initialized() (for memory_hotplug)
05 - use the a
Patches that follow add a inline function zone_end_pfn(), which
conflicts with the naming of a local variable in isolate_freepages().
Rename the variable so it does not conflict.
Signed-off-by: Cody P Schafer
---
mm/compaction.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
Remove open coding of ensure_zone_is_initialzied().
Signed-off-by: Cody P Schafer
---
mm/memory_hotplug.c | 29 ++---
1 file changed, 10 insertions(+), 19 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 875bdfe..8e352fe 100644
--- a/mm
Instead of directly utilizing a combination of config options to determine this,
add a macro to specifically address it.
Signed-off-by: Cody P Schafer
---
include/linux/mm.h | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index
Switch to using zone_end_pfn from open coding.
Signed-off-by: Cody P Schafer
---
mm/compaction.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index 1b52528..ea66be3 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -85,7 +85,7
From: Cody P Schafer
Instead of open coding, use the exsisting node_start_pfn() and
node_end_pfn() helpers.
Signed-off-by: Cody P Schafer
---
mm/kmemleak.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 752a705..83dd5fb 100644
Add a debug message which prints when a page is found outside of the
boundaries of the zone it should belong to. Format is:
"page $pfn outside zone [ $start_pfn - $end_pfn ]"
Signed-off-by: Cody P Schafer
---
mm/page_alloc.c | 7 +++
1 file changed, 7 insertions(+)
diff
From: Cody P Schafer
Change several open coded zone_end_pfn()s and a zone_spans_pfn() in the
page allocator to use the provided helper functions.
Signed-off-by: Cody P Schafer
---
mm/page_alloc.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/mm/page_alloc.c b
From: Cody P Schafer
Replace open coded pgdat_end_pfn() with helper function.
Signed-off-by: Cody P Schafer
---
mm/memory_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 8e352fe..0a74b86a 100644
--- a/mm
In vmstat, use zone_end_pfn() instead of an opencoded version.
Signed-off-by: Cody P Schafer
---
mm/vmstat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 9800306..ca99641 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -890,7 +890,7 @@ static
Switch to using zone_end_pfn() in move_pfn_range_left() and
move_pfn_range_right() instead of open coding the same.
Signed-off-by: Cody P Schafer
---
mm/memory_hotplug.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
Create a new function grow_pgdat_and_zone() which handles locking +
growth of a zone & the pgdat which it is associated with.
Signed-off-by: Cody P Schafer
---
mm/memory_hotplug.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/mm/memory_hotplug.c
From: Cody P Schafer
In 2 VM_BUG()s, avoid open coding zone ownership of pfns.
Signed-off-by: Cody P Schafer
---
mm/page_alloc.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3911c1a..c5d70ce 100644
--- a/mm/page_alloc.c
igure it out.
Signed-off-by: Cody P Schafer
---
mm/page_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index da5a5ec..3911c1a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -978,9 +978,9 @@ int move_freepages_block(struct zo
From: Cody P Schafer
Freeing pages to uninitialized zones is not handled by
__free_one_page(), and should never happen when the code is correct.
Ran into this while writing some code that dynamically onlines extra
zones.
Signed-off-by: Cody P Schafer
---
mm/page_alloc.c | 2 ++
1 file
From: Cody P Schafer
ensure_zone_is_initialized() checks if a zone is in a empty & not
initialized state (typically occuring after it is created in memory
hotplugging), and, if so, calls init_currently_empty_zone() to
initialize the zone.
Signed-off-by: Cody P Schafer
---
mm/memory_hotpl
From: Cody P Schafer
Add zone_is_initialized(), zone_is_empty(), zone_spans_pfn(), and
zone_end_pfn().
Signed-off-by: Cody P Schafer
---
include/linux/mmzone.h | 20
1 file changed, 20 insertions(+)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index
From: Cody P Schafer
Add pgdat_end_pfn() and pgdat_is_empty() helpers which match the similar
zone_*() functions.
Change node_end_pfn() to be a wrapper of pgdat_end_pfn().
Signed-off-by: Cody P Schafer
---
include/linux/mmzone.h | 14 ++
1 file changed, 10 insertions(+), 4
Instead of directly utilizing a combination of config options to determine this,
add a macro to specifically address it.
Signed-off-by: Cody P Schafer
---
include/linux/mm.h | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index
Add a debug message which prints when a page is found outside of the
boundaries of the zone it should belong to. Format is:
"page $pfn outside zone [ $start_pfn - $end_pfn ]"
Signed-off-by: Cody P Schafer
---
mm/page_alloc.c | 7 +++
1 file changed, 7 insertions(+)
diff
Replace open coded pgdat_end_pfn() with helper function.
Signed-off-by: Cody P Schafer
---
mm/memory_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 016944f..6eb93a5 100644
--- a/mm/memory_hotplug.c
+++ b/mm
From: Cody P Schafer
Add pgdat_end_pfn() and pgdat_is_empty() helpers which match the similar
zone_*() functions.
Change node_end_pfn() to be a wrapper of pgdat_end_pfn().
Signed-off-by: Cody P Schafer
---
include/linux/mmzone.h | 14 ++
1 file changed, 10 insertions(+), 4
Remove open coding of ensure_zone_is_initialzied().
Signed-off-by: Cody P Schafer
---
mm/memory_hotplug.c | 29 ++---
1 file changed, 10 insertions(+), 19 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index bede456..016944f 100644
--- a/mm
From: Cody P Schafer
ensure_zone_is_initialized() checks if a zone is in a empty & not
initialized state (typically occuring after it is created in memory
hotplugging), and, if so, calls init_currently_empty_zone() to
initialize the zone.
Signed-off-by: Cody P Schafer
---
mm/memory_hotpl
Summaries:
1 - avoid repeating checks for section in page flags by adding a define.
2 - add & switch to zone_end_pfn() and zone_spans_pfn()
3 - adds zone_is_initialized() & zone_is_empty()
4 - adds a VM_BUG using zone_is_initialized() in __free_one_page()
5 - add pgdat_end_pfn() and pgdat_is_empty(
From: Cody P Schafer
Freeing pages to uninitialized zones is not handled by
__free_one_page(), and should never happen when the code is correct.
Ran into this while writing some code that dynamically onlines extra
zones.
Signed-off-by: Cody P Schafer
---
mm/page_alloc.c | 2 ++
1 file
Add 2 helpers (zone_end_pfn() and zone_spans_pfn()) to reduce code
duplication.
This also switches to using them in compaction (where an additional
variable needed to be renamed), page_alloc, vmstat, memory_hotplug,
and kmemleak.
Signed-off-by: Cody P Schafer
---
Note that in compaction.c I
Factoring out these 2 checks makes it more clear what we are actually
checking for.
Signed-off-by: Cody P Schafer
---
include/linux/mmzone.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index d91d964..696cb7c 100644
--- a
I needed to decode some gfp_masks to debug an oom-killer invocation, and wrote
this tool to avoid doing the decoding manually.
Bad things about this: slightly hacky use of code intended for use with ftrace,
splitting linux/gfp.h into 2 parts.
Good things: No additional places need modification to
From: Cody P Schafer
Allows decoding of gfp_masks printed, for example, when the oom-killer
is invoked.
Example usage:
[6.464753] kthreadd invoked oom-killer: gfp_mask=0x1000d0, order=1,
oom_score_adj=0
$ ./gfp-decode 0x1000d0
GFP_KERNEL|GFP_KMEMCG
Internally, it
Split the current linux/gfp.h into gfp.h and gfp-flags.h
All the defines for flags are placed into gfp-flags.h which is included
from gfp.h
This split allows the use of the defines by userspace tools, such as a
gfp decoder.
Signed-off-by: Cody P Schafer
---
include/linux/gfp-flags.h | 143
The only persistent change made by this loop is calling
memblock_set_node() once for each memblock, which is not useful (and has
no effect) as memblock_set_node() is not called with any
memblock-specific parameters.
Subsistute a single memblock_set_node().
Signed-off-by: Cody P Schafer
---
Now
Add gfp.h, mmzone.h, memory_hotplug.h & vmalloc.h to the "MEMORY
MANAGMENT" section so scripts/get_maintainer.pl can do a better job of
making recommendations.
Signed-off-by: Cody P Schafer
---
MAINTAINERS | 4
1 file changed, 4 insertions(+)
diff --git a/MAINTAINERS b/MAI
ds of rb_node & cgwb_congested_tree as required by
other users of those structures.
CC: Tejun Heo
Signed-off-by: Cody P Schafer
---
include/linux/rbtree.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
inde
On Thu, Dec 4, 2014 at 7:44 AM, Jiri Olsa wrote:
> On Tue, Dec 02, 2014 at 06:09:35PM -0800, Sukadev Bhattiprolu wrote:
>> From: Cody P Schafer
>>
>> Enable event specification like:
>>
>> pmu/event_name,param1=0x1,param2=0x4/
>>
>> Assuming t
+ /* Check for overflow when calculating sizeof_sym_hist */
+ if (size > (SIZE_MAX / sizeof(u64)))
+ return -1;
How does it guarantee that the end result which used in zalloc below
would not overflow?
+
+ sizeof_sym_hist = (sizeof(struct sym_hist) + size * sizeo
struct annotation *notes = symbol__annotation(sym);
const size_t size = symbol__size(sym);
- size_t sizeof_sym_hist = (sizeof(struct sym_hist) + size * sizeof(u64));
+ size_t sizeof_sym_hist;
+
+ /* Check for overflow when calculating sizeof_sym_hist */
+
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
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
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
On 02/24/2014 07:33 PM, Michael Ellerman wrote:
On Fri, 2014-14-02 at 22:02:13 UTC, Cody P Schafer wrote:
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
On 02/24/2014 07:33 PM, Michael Ellerman wrote:
On Fri, 2014-14-02 at 22:02:08 UTC, Cody P Schafer wrote:
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
On 02/24/2014 07:33 PM, Michael Ellerman wrote:
[PATCH v2 07/11] powerpc: add a shared interface to get gpci version and
capabilities
All the patches that touch perf should be "powerpc/perf: foo"
Ok.
On Fri, 2014-14-02 at 22:02:11 UTC, Cody P Schafer wrote:
...
I realise
On 02/24/2014 07:33 PM, Michael Ellerman wrote:
On Fri, 2014-14-02 at 22:02:12 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).
Can you explain how
On 02/24/2014 07:33 PM, Michael Ellerman wrote:
On Fri, 2014-14-02 at 22:02:14 UTC, Cody P Schafer wrote:
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
On 02/25/2014 02:20 AM, Peter Zijlstra wrote:
On Tue, Feb 25, 2014 at 02:33:26PM +1100, Michael Ellerman wrote:
On Fri, 2014-14-02 at 22:02:06 UTC, Cody P Schafer wrote:
Export the swevent hrtimer helpers currently only used in events/core.c
to allow the addition of architecture specific sw
On 02/25/2014 12:33 PM, Cody P Schafer wrote:
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.con
On 02/24/2014 08:53 PM, Madhavan Srinivasan wrote:
On Saturday 22 February 2014 05:44 AM, Cody P Schafer wrote:
/sys/devices/system/cpu/cpu*/smt-snooze-delay was converted into a NOP
in commit 3fa8cad82b94d0bed002571bd246f2299ffc876b, and now does
nothing. Add a pr_warn() to convince any users
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
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
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
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
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
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
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
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
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
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
().
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
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
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
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
> >
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
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
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
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
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
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
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
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
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
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
201 - 300 of 452 matches
Mail list logo