Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1269799
| From | yalin wang <yalin.wang2010@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V4] mm: fix kernel crash in khugepaged thread |
| Date | 2015-11-16 02:40 +0100 |
| Message-ID | <qvgVX-M3-11@gated-at.bofh.it> (permalink) |
| References | <qtVqx-6ta-5@gated-at.bofh.it> <qu12W-1Bf-21@gated-at.bofh.it> <quk5z-5gS-15@gated-at.bofh.it> <qulbk-5Uo-9@gated-at.bofh.it> <qund8-7qr-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> On Nov 13, 2015, at 22:01, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Fri, 13 Nov 2015 19:54:11 +0800
> yalin wang <yalin.wang2010@gmail.com> wrote:
>
>>>>> TP_fast_assign(
>>>>> __entry->mm = mm;
>>>>> - __entry->pfn = pfn;
>>>>> + __entry->pfn = page_to_pfn(page);
>>>>
>>>> Instead of the condition, we could have:
>>>>
>>>> __entry->pfn = page ? page_to_pfn(page) : -1;
>>>
>>> I agree. Please do it like this.
>
> hmm, pfn is defined as an unsigned long, would -1 be the best.
> Or should it be (-1UL).
>
> Then we could also have:
>
> TP_printk("mm=%p, scan_pfn=0x%lx%s, writable=%d, referenced=%d, none_or_zero=%d, status=%s, unmapped=%d",
> __entry->mm,
> __entry->pfn == (-1UL) ? 0 : __entry->pfn,
> __entry->pfn == (-1UL) ? "(null)" : "",
>
> Note the added %s after %lx I have in the print format.
>
> -- Steve
it is not easy to print for perf tools in userspace ,
if you use this format ,
for user space perf tool, it print the entry by look up the member in entry struct by offset ,
you print a dynamic string which user space perf tool don’t know how to print this string .
Thanks --
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V4] mm: fix kernel crash in khugepaged thread yalin wang <yalin.wang2010@gmail.com> - 2015-11-12 09:30 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Steven Rostedt <rostedt@goodmis.org> - 2015-11-12 15:30 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Vlastimil Babka <vbabka@suse.cz> - 2015-11-13 11:50 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread yalin wang <yalin.wang2010@gmail.com> - 2015-11-13 13:00 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Steven Rostedt <rostedt@goodmis.org> - 2015-11-13 15:10 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread yalin wang <yalin.wang2010@gmail.com> - 2015-11-16 02:40 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Vlastimil Babka <vbabka@suse.cz> - 2015-11-16 11:20 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Steven Rostedt <rostedt@goodmis.org> - 2015-11-16 15:30 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread yalin wang <yalin.wang2010@gmail.com> - 2015-11-17 03:30 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Steven Rostedt <rostedt@goodmis.org> - 2015-11-17 03:50 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread yalin wang <yalin.wang2010@gmail.com> - 2015-11-17 05:00 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Vlastimil Babka <vbabka@suse.cz> - 2015-11-17 08:50 +0100
Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Steven Rostedt <rostedt@goodmis.org> - 2015-11-16 15:30 +0100
csiph-web