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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 E296CC4360F for ; Thu, 21 Mar 2019 17:13:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A109421900 for ; Thu, 21 Mar 2019 17:13:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728642AbfCURNd convert rfc822-to-8bit (ORCPT ); Thu, 21 Mar 2019 13:13:33 -0400 Received: from terminus.zytor.com ([198.137.202.136]:47043 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728013AbfCURNd (ORCPT ); Thu, 21 Mar 2019 13:13:33 -0400 Received: from [10.170.29.226] ([192.55.54.59]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id x2LHCfN8215249 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 21 Mar 2019 10:12:42 -0700 Date: Thu, 21 Mar 2019 10:12:35 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20190318153840.906404905@infradead.org> <20190318155139.963285969@infradead.org> <20190318173657.GV6058@hirez.programming.kicks-ass.net> <20190318175135.GE6521@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 01/25] x86: Make SMAP 64-bit only To: Linus Torvalds , Peter Zijlstra CC: Thomas Gleixner , Julien Thierry , Will Deacon , Andy Lutomirski , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Josh Poimboeuf , Andrew Lutomirski , Borislav Petkov , Denys Vlasenko , Linux List Kernel Mailing , Dmitry Vyukov , Steven Rostedt From: hpa@zytor.com Message-ID: <168D2D76-419B-46F1-B3D5-76CB1F1C252F@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On March 18, 2019 11:10:22 AM PDT, Linus Torvalds wrote: >On Mon, Mar 18, 2019 at 10:51 AM Peter Zijlstra >wrote: >> >> How about I do a patch that schedules EFLAGS for both 32bit and >64bit, >> mark this for backporting to infinity. >> >> And then at the end, after the objtool-ac bits land, I do a patch >> removing the EFLAGS scheduling for x86_64. > >Sounds sane to me. > >And we can make it AC-conditional if it's actually shown to be visible >from a performance standpoint. > >But iirc pushf/popf isn't really that expensive - in fact I think it's >pretty cheap when system flags don't change. Which would be the common >case unless you'd also make the popf do the irq restore part and >simply make finish_lock_switch() re-enable irq's by doing an >irqrestore? > >I think popf is like 20 cycles or something (and pushf is just single >cycles). Probably not worth worrying about in the task switch context. > > Linus Yes, the problem isn't scheduling per se but the risk of hiding problems. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.