Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753030AbdLHTII (ORCPT ); Fri, 8 Dec 2017 14:08:08 -0500 Received: from mga02.intel.com ([134.134.136.20]:50751 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbdLHTIG (ORCPT ); Fri, 8 Dec 2017 14:08:06 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,378,1508828400"; d="scan'208";a="1253222173" From: Andi Kleen To: Alexey Dobriyan Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: Re: [PATCH 4/5] -march=native: REP STOSB References: <20171207224154.4687-1-adobriyan@gmail.com> <20171207224154.4687-4-adobriyan@gmail.com> Date: Fri, 08 Dec 2017 11:08:04 -0800 In-Reply-To: <20171207224154.4687-4-adobriyan@gmail.com> (Alexey Dobriyan's message of "Fri, 8 Dec 2017 01:41:53 +0300") Message-ID: <877etxjawb.fsf@linux.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 432 Lines: 20 Alexey Dobriyan writes: > > +#ifdef CONFIG_MARCH_NATIVE_REP_STOSB > +static __always_inline void clear_page(void *page) > +{ > + uint32_t len = PAGE_SIZE; > + asm volatile ( > + "rep stosb" > + : "+D" (page), "+c" (len) > + : "a" (0) > + : "memory" > + ); > +} clear_page_64 already patches in the equivalent code sequence, it's clear_page_erms() It's very doubtful that this patch is worth it. -Andi