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: Anshuman Khandual <anshuman.khandual@xxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>
- Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()
- From: Dave Hansen <dave.hansen@xxxxxxxxx>
- Date: Sun, 9 Jun 2019 21:57:29 -0700
- 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: <f1b109a3-ef4c-359c-a124-e219e84a6266@arm.com>
- Openpgp: preference=signencrypt
- References: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com> <20190607201202.GA32656@bombadil.infradead.org> <f1b109a3-ef4c-359c-a124-e219e84a6266@arm.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0
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.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]