From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E59CB1A1DEC for ; Thu, 11 Aug 2016 14:53:23 -0700 (PDT) Received: by mail-it0-x236.google.com with SMTP id x130so9119474ite.1 for ; Thu, 11 Aug 2016 14:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=N6yt6N12ehCsbyB6iYV/juRf0d+7SMosCUmMSgdTrpg=; b=Lnx1lMgdgVtHbi0YLSAC6UIwkQX/hmg/CjsRtGALbjhxkfEvlrRDIhxmtPJCyFZCcp 4d79KIe40AxYy2QmrolwFQm803m72RI1bWEayVlmdfu0y1VkVT7QjnI5F+Z2a1cIsrUD +gVNyBAnZ46Sd5J/vT6X0tk7IGsH2GRkNJkqA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=N6yt6N12ehCsbyB6iYV/juRf0d+7SMosCUmMSgdTrpg=; b=dF6mJbleovXIMvkJpF3uqQTpq3PIPlwuzGauwj2dTVJYkVazMjVb1u6VD3JR/8sYl0 RDJMDE2N2bpeNo75ghG7JfFZ/UIp4x9Y2dMVhXb0cGRyYwep5tvpCmWGAX5RPyVGFSPK x7dEE/BiDqaQW36zOB5z5q1aKw/nF3kVA/KQNldImPVMP2QTAC/Fzk/EtwQWkbxK2csU jzPBKAaNtAcOxzuM5IIBx/e+9P8udVcPcwioCFxhpAa8nw43zxQG2q3A2zz0CE4cjE/n QGouixwcWrALlD+42A/qe5xwstKmspsGmn2P9uZrenIoVGiTeBMrseQaQu/E8DU+/hS7 Le/A== X-Gm-Message-State: AEkoousPPdT/t4WPyjGO548uNB2hNGQyyEt75SBolfNueKJjwgacl1r7aW653lXaHomKK5S1zZhmsTrNNxMPMXf9 X-Received: by 10.36.39.77 with SMTP id g74mr12102355ita.51.1470952403013; Thu, 11 Aug 2016 14:53:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Thu, 11 Aug 2016 14:53:22 -0700 (PDT) In-Reply-To: References: <1470939632-32198-1-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Thu, 11 Aug 2016 23:53:22 +0200 Message-ID: To: "Cohen, Eugene" Cc: "edk2-devel@lists.01.org" , "leif.lindholm@linaro.org" , "liming.gao@intel.com" Subject: Re: [PATCH 1/3] ArmPkg/CompilerIntrinsicsLib: replace memcpy and memset with C code X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2016 21:53:24 -0000 Content-Type: text/plain; charset=UTF-8 On 11 August 2016 at 23:50, Cohen, Eugene wrote: >> > Why does memcpy performance matter? In addition to the overall >> memcpy stuff scattered around C code we have an instance that is >> particularly sensitive to memcpy performance. For DMA operations >> when invoking double-buffering or access to portions of a buffer that >> is common mapped (i.e. uncached on non-coherent DMA systems) the >> impact of a non-optimized memcpy is enormous compared to the >> optimized ones because the penalty is amplified by orders of >> magnitude due to uncached memory access latency. >> > >> >> That code would be using CopyMem(), no? This only serves the >> compiler >> generated calls, which are few since Tianocore does not allow >> initialized locals. > > I see and agree that should minimize the impact. I guess I'll ask the naive question. Could the BaseMemoryLib and CompilerIntrinsicsLib share the same stuff? > Let me look into that