From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 388F4C433F5 for ; Thu, 11 Nov 2021 18:16:12 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E15B261179 for ; Thu, 11 Nov 2021 18:16:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E15B261179 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.224868.388405 (Exim 4.92) (envelope-from ) id 1mlEbf-0002jR-SS; Thu, 11 Nov 2021 18:15:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 224868.388405; Thu, 11 Nov 2021 18:15:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mlEbf-0002jK-PW; Thu, 11 Nov 2021 18:15:27 +0000 Received: by outflank-mailman (input) for mailman id 224868; Thu, 11 Nov 2021 18:15:27 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mlEbf-0002jE-8t for xen-devel@lists.xenproject.org; Thu, 11 Nov 2021 18:15:27 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mlEbe-00033x-PC; Thu, 11 Nov 2021 18:15:26 +0000 Received: from 54-240-197-233.amazon.com ([54.240.197.233] helo=[192.168.21.213]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mlEbe-0000mj-IA; Thu, 11 Nov 2021 18:15:26 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=neclcxZecPd1G6I42Q7FcOjCjypvKTmhDd+cD/f3+Kk=; b=6lGAGGkBCUkSHggC11MIKX9w/9 Zi/Z6R9m5SWfTppCKyd6g+eJVmcvGUOdf8asBwy62bdh2DFv6BVeCUXwczqvSnMsCj+3GlYJRWzFr QxKsck8kG8lo54oP+Mvtnz/RmgSVWYpu1cjVoeRvTnb+/Q3GWhQ9/qWFbfcuICMofKVQ=; Message-ID: <409d2c17-d1e7-40b3-226a-b6ca4c0a15bf@xen.org> Date: Thu, 11 Nov 2021 18:15:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH 3/5] xen/sort: Switch to an extern inline implementation To: Andrew Cooper , Xen-devel Cc: Jan Beulich , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Wei Liu , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis References: <20211111175740.23480-1-andrew.cooper3@citrix.com> <20211111175740.23480-4-andrew.cooper3@citrix.com> From: Julien Grall In-Reply-To: <20211111175740.23480-4-andrew.cooper3@citrix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Andrew, On 11/11/2021 17:57, Andrew Cooper wrote: > There are exactly 3 callers of sort() in the hypervisor. > > Both arm callers pass in NULL for the swap function. While this might seem > like an attractive option at first, it causes generic_swap() to be used which > forced a byte-wise copy. Provide real swap functions which the compiler can > optimise sensibly. I understand the theory, but none of the two calls are in hot paths or deal with large set on Arm. So I am rather hesitant to introduce specialised swap in each case as it doesn't seem we will gain much from this change. Cheers, -- Julien Grall