Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752213AbdCEJyb (ORCPT ); Sun, 5 Mar 2017 04:54:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:44718 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbdCEJya (ORCPT ); Sun, 5 Mar 2017 04:54:30 -0500 Date: Sun, 5 Mar 2017 10:54:24 +0100 From: Borislav Petkov To: Logan Gunthorpe Cc: hpa@zytor.com, Thomas Gleixner , Ingo Molnar , Tony Luck , Al Viro , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: Question Regarding ERMS memcpy Message-ID: <20170305095424.odptnh7vcesv442y@pd.tnic> References: <20170304224341.zfp4fl37ypt57amg@pd.tnic> <5CCEF10D-5647-4503-A398-0681DF2C8847@zytor.com> <20170305001447.kcxignj3nsq35vci@pd.tnic> <20170305003349.6kgq4ovj7ipezfxu@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 22 On Sat, Mar 04, 2017 at 09:58:14PM -0700, Logan Gunthorpe wrote: > So, I've found that my kernel config had the OPTIMIZE_FOR_SIZE selected > instead of OPTIMIZE_FOR_PERFORMANCE. I'm not sure why that is but > switching to the latter option fixes my problem. A memcpy call is used > instead of the poor inline solution. (I'm not really sure how the inline > solution even makes any sense as it almost certainly makes things larger > in the grand scheme of things.) Probably some gcc heuristics don't work as expected... In any case, I have # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set here and it still generates REP; MOVSL in dmi_scan_machine(). -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --