Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Dave Hansen <dave.hansen@xxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>
- Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()
- From: Anshuman Khandual <anshuman.khandual@xxxxxxx>
- Date: Mon, 10 Jun 2019 10:36:32 +0530
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxx>, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Andrey Konovalov <andreyknvl@xxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will.deacon@xxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxxxx>, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, James Hogan <jhogan@xxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Paul Burton <paul.burton@xxxxxxxx>
- In-reply-to: <33c6a1cd-5c07-e623-28e5-f31f6fe30394@intel.com>
- References: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com> <20190607201202.GA32656@bombadil.infradead.org> <f1b109a3-ef4c-359c-a124-e219e84a6266@arm.com> <33c6a1cd-5c07-e623-28e5-f31f6fe30394@intel.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
On 06/10/2019 10:27 AM, Dave Hansen wrote:
> On 6/9/19 9:34 PM, Anshuman Khandual wrote:
>>> Do you really think this is easier to read?
>>>
>>> Why not just move the x86 version to include/linux/kprobes.h, and replace
>>> the int with bool?
>> Will just return bool directly without an additional variable here as suggested
>> before. But for the conditional statement, I guess the proposed one here is more
>> compact than the x86 one.
>
> FWIW, I don't think "compact" is generally a good goal for code. Being
> readable is 100x more important than being compact and being un-compact
> is only a problem when it hurts readability.
>
> For a function like the one in question, having the individual return
> conditions clearly commented is way more important than saving 10 lines
> of code.
Fair enough. Will keep the existing code flow from x86.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]