Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp851319img; Thu, 21 Mar 2019 10:14:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQOYtOVhbC2Sosc9oece2pXi4vqg2AYh7GDayQo0d26iVaANtzITefYXUL4IRVtNEMcUGr X-Received: by 2002:a17:902:968b:: with SMTP id n11mr4712236plp.316.1553188468313; Thu, 21 Mar 2019 10:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553188468; cv=none; d=google.com; s=arc-20160816; b=Drfh9ILk5cDfhRolwJj78+hCAyjKiVEZdoyrenx64jtFUq1AtA+7F2dUaqmLcCbWNL WBMmqb6U4DcBon27b4m/6A4nF01NI0/N14xXvQuhL+z5J/4KxXChQy4ouXRgCpg4Ib5e +ekwCbgmcis9OFtbE6W5aYXHjbKE+qGneoU3kCuhGtH8ScBRKIsdSvp79Wr4PBfc6XqI PBWbzvmWj0JzMeTHIhd40i4W8vnEj/gm3G2+R8nt5EQIW0qyNHHwj2lLs/RM7sqlfpgm rKM/gkICAnIi/rk+DJzoKQE5SlfqpA3A99kchWWA2f5RrBZDyV2yi8DmT+wEi2TCzQbz ++eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=F95LHwDIi3lKJfTHFtkRhX4gZ7FcNh6TU6WKrdPNcOM=; b=DQBLHaNsW839epkRVM1tb8FxTfAr/NaYgAGr8kc2bb3+/MpGgahsZUWLgq1MgGBz/2 yDZb/pTiMY/TGGluGHXaLivFCfAmrrTrCDWRCa1WTQ4Km0USjeVaNzAjgcHEX858wRvz Ah3oR3AkOCmi3HPenMW7PbldXe39kNkgw43S7UQHSWgtdA/7DhLfy8TZg9EsTqyFjvOt v3qTgh3LweHkkYMTpa36uYz8PM5Q7F2XBjV9ejFHKUdAuH8zs9izyyaCGnN5D5PAbFWF QrYV3oA5fZM+kllxzfpF2kLzQ3hJuKCGjZL7J6G0bu+Cv00lqqoZ16EmLC1YDS/Wbawo m0bQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e16si4254459pgv.436.2019.03.21.10.14.13; Thu, 21 Mar 2019 10:14:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728631AbfCURNd convert rfc822-to-8bit (ORCPT + 99 others); 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.