Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7563CC4320A for ; Wed, 11 Aug 2021 19:01:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0CDDE61102 for ; Wed, 11 Aug 2021 19:01:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0CDDE61102 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 7CBE36B0071; Wed, 11 Aug 2021 15:01:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77C176B0072; Wed, 11 Aug 2021 15:01:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66A8E8D0001; Wed, 11 Aug 2021 15:01:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 485016B0071 for ; Wed, 11 Aug 2021 15:01:29 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E2F2620EEF for ; Wed, 11 Aug 2021 19:01:28 +0000 (UTC) X-FDA: 78463718256.30.CBA5339 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf09.hostedemail.com (Postfix) with ESMTP id 9DF7D30013B2 for ; Wed, 11 Aug 2021 19:01:28 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 7292E6105A; Wed, 11 Aug 2021 19:01:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628708487; bh=m9TeT/3Nd18chDNafC9ANZmnNV4sJc+ahNObhasQTPk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=QBaZL2cZuYfjROADUeXkULhwxf64s73vOFLrYymG/psmdKrMoXjYDHDEmePv590bF IVvrRH6Htrh+OmRTd1Iv0sBWHCrvFYrExdJibMFkaC6wImWqZHc9RLBRdLSGz686il 5x6iqjckarrUAJCOn6JblgdRpHlBlwVDFyra4nQvgpj0TQmm5Ai0S+oY/bvv86GTV+ Ky/EBnrSo7k6hKlOMM/JMZZi1KkcY+9BvfKl2yZD4IbkGvzBXzf2AqTh01jGfMVVAI Qp96pVknD/jTeXDhdBpj0SmVxxQY5V+Ie28Vy/PkfS4a0AWqD+UXz9RYXUfnUZT1mT xayhdmktl1S3g== Subject: Re: [PATCH 06/18] ARC: mm: Enable STRICT_MM_TYPECHECKS To: Mike Rapoport , Vineet Gupta Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Anshuman Khandual References: <20210811004258.138075-1-vgupta@kernel.org> <20210811004258.138075-7-vgupta@kernel.org> From: Vineet Gupta Message-ID: Date: Wed, 11 Aug 2021 12:01:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 9DF7D30013B2 X-Stat-Signature: 9qnkf1ezsnjhrc79gzqhkpje391jx7p5 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QBaZL2cZ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf09.hostedemail.com: domain of vgupta@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=vgupta@kernel.org X-HE-Tag: 1628708488-493117 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 8/11/21 5:04 AM, Mike Rapoport wrote: > On Tue, Aug 10, 2021 at 05:42:46PM -0700, Vineet Gupta wrote: >> In the past I've refrained from doing this (atleast 2 times) due to the > ^ at least > >> slight code bloat due to ABI implications of pte_t etc becoming sttuct > ^ struct >> Per ARC ABI, functions return struct via memory and not through register >> r0, even if the struct would fits in register(s) > ^ fit Fixed. >> - caller allocates space on stack and passes the address as first arg >> (r0), shifting rest of args by one >> >> - callee creates return struct in memory (referenced via r0) >> >> This time around the code actually shrunk slightly (due to subtle >> inlining heuristic effects), but still slightly inefficient due to >> return values passed through memory. That however seems like a small > Out of curiosity, is this actually measurable on real world applications? Not really, but they look hideous to an objdump hunkie like me (who treats waste of electrons like wasting food) and wondering what piece of art your compiler is spitting out ;-) only to realize that is source code induced.