Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2819429ybi; Sun, 9 Jun 2019 22:07:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWzN1T4cM52SxL1XQNqRnl3auLyFP83Pkqkoo2FITNOUMlknj8sCRDPFk2NvAGzoQdAWQL X-Received: by 2002:a62:7d13:: with SMTP id y19mr14274894pfc.62.1560143239180; Sun, 09 Jun 2019 22:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560143239; cv=none; d=google.com; s=arc-20160816; b=N8VkmnDCCuDpT2A3w1PwBoyMfoBNV48oPVZ3uTnC8QA/I+/fdOyM3xD0VXBxRGtYVF r10K/QA6e8J12diRG0mw9GzHzGimG0kpygzEtxieoorKXzP9iPtTz0F+9x72Ar1wkus0 aeAVqA2tAaqOo8WowKYqVq7QAXQQTE9g24DnRhwVvDtLLRSUMAW0Q/0HVhSYm2U9mkph zZaQp3pDZvNE3OwMCWGzx0GxwDS3DMuMuuEk9WZMlt6ocdA77QiOSGgke9aUwRvx+ARi sbFRuSqKB3WRsywElYunySuQlGlkglLmrZZ04ixTu0DFrMkQ7sWwUuJP/IB7IA4fuIfT VYbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Wz2zQ+Nf23f/S37L/eyEoJVgucVH00h1gMyuDCGh3XU=; b=yo/kzNHBuxtMbJIgloZAePCOfW/STfUmJEl9RcNj4jl4AzwPC1376EFz7S7iBKkqDd /sisHapk6KhyssGugkOJnhuzPpRj6/4/rj5x3zrfP7TY18qOrgbIym4KyCNfX9PCbi98 pUJHdDNWs4x2JtY8IM/2IfRXphLfQR0R01Z/zpVq3a5R5GGVjWaQuf+/abK0gA+Ddi18 sNM13Kho/9Rp11Mnlwz6FI5oG7Zdp0aU//AmbtamNiXRjMigLPJu8RriSV9Nkn748K0z Poqa+JSDa3nlgq5UKBJwMKy1qWVnQxXHSwHC3EjVfRWyOEpT17F/EoxuFE6CjhK2gJBQ IUnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si2220241pjq.46.2019.06.09.22.07.02; Sun, 09 Jun 2019 22:07:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387492AbfFJFGZ (ORCPT + 99 others); Mon, 10 Jun 2019 01:06:25 -0400 Received: from foss.arm.com ([217.140.110.172]:36280 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387402AbfFJFGY (ORCPT ); Mon, 10 Jun 2019 01:06:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A00A9337; Sun, 9 Jun 2019 22:06:23 -0700 (PDT) Received: from [10.162.42.131] (p8cg001049571a15.blr.arm.com [10.162.42.131]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D10043F557; Sun, 9 Jun 2019 22:06:13 -0700 (PDT) Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault() To: Dave Hansen , Matthew Wilcox Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Andrew Morton , Michal Hocko , Mark Rutland , Christophe Leroy , Stephen Rothwell , Andrey Konovalov , Michael Ellerman , Paul Mackerras , Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , "David S. Miller" , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Andy Lutomirski , Dave Hansen , Vineet Gupta , linux-snps-arc@lists.infradead.org, James Hogan , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton References: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com> <20190607201202.GA32656@bombadil.infradead.org> <33c6a1cd-5c07-e623-28e5-f31f6fe30394@intel.com> From: Anshuman Khandual Message-ID: <62aa0369-9542-17bc-034b-8445664c7c10@arm.com> Date: Mon, 10 Jun 2019 10:36:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <33c6a1cd-5c07-e623-28e5-f31f6fe30394@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.