Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1601160ybi; Thu, 20 Jun 2019 00:15:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy+H7/EpkDeMVSYmvS8ILMe6G1tAtDp6PzEETAaN3gXzBYrhgLDusYz+PLBYPhWox8S9/r X-Received: by 2002:a63:4185:: with SMTP id o127mr11197633pga.82.1561014945344; Thu, 20 Jun 2019 00:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561014945; cv=none; d=google.com; s=arc-20160816; b=MP81BDb0onPw/Ckj2cBCRzgc/ea9rQT11FDlrBxjRYipzommYMYIRCTmoi6gwNMjmW uq4elPDqHLjBv445VF0u605YuXOgHBHEcEHT+w0rWjGoPBYeIpsdar7+ddo0ahQ/fOo2 ot0wzJxvK4hJuL2/L8ANWSKW+ThL8H7/Z5CVwt4GMKhSOfy2e5/Jrz0DQzkI0MkCgPJW /Q01Kddo5+hVkLd011UPd955viMGdzDgBNmKopL0Li+wqmhvjmDhubIY5lKkF2yLD38T gCJZrzlgYJZDzvXrm7QARG2uyNbs1UVmXFf4QcCmw6McLeZlpxaA0vUUAdgNKllDYjlZ ivcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YLDOeKEFgKiCJoPhKcSOnanWSsPi7sudQNGrpls87Xk=; b=EFBJyV49gNrKXjF9h0u2Nm9LuRL4uCHGXWucAdRdzj8AU3xSKmQ1Z6ODy0umIBVnkL 5jujTkZpg+2uLfibHY2AfJqa86TDcKa1zugnkGRHxBpmI9C8xigmL9hFDcjV0BTpPu71 lHXNxEI0JlE0hOybLpe+N+0F32PV+4Zp8BT6e1g7AfX9BBcc42z+6BhgnNqpUwA1IzqX AUYhTuBFV/NUv11vbO39rTmIEWD2yGz668OyocFWRNxBaojvsFC3gWgC7AY79EIH98Wi TghfERUqZ5YEn3eJyBT0MX5CY9GVezR3XB3Gj2Wk++Am9SyX3GdvnA2UW8dXNT+Czcar VUbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Hvh03hze; 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 i10si4932204pgs.231.2019.06.20.00.15.28; Thu, 20 Jun 2019 00:15:45 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Hvh03hze; 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 S1726391AbfFTHPX (ORCPT + 99 others); Thu, 20 Jun 2019 03:15:23 -0400 Received: from merlin.infradead.org ([205.233.59.134]:39460 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbfFTHPX (ORCPT ); Thu, 20 Jun 2019 03:15:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YLDOeKEFgKiCJoPhKcSOnanWSsPi7sudQNGrpls87Xk=; b=Hvh03hzeGqUCZ23Rsfw22JUI6 D15b+sIQwzRdM/hYgY+rDpSs0Y6SrxJUs1LKWQc1JPVMhIbRJ7foMOn7NgSJFUeyWT0oOd7iLXL5i lmoAVhGfGkzu1UQFezcyyvhwJdSQZqMsy0XHAe8e0XH9ye0jNck0+IRfBvKsXGgTiSkq2Lf4C6q06 T4evu9PuTMaF219uCJSDTfB8cfopDzHV/CRxLVEAOwjY5Lg56kGpWjzCQvVV/f8nKMmLFm+lnKJXA 55LXQbPUwJMRgadEbITW4beOs0lC4tLVykc/xR7U+8T+ceazUUj5KLY6vWeU/d1HJJcaCZciT8s4e TBVAghfkQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hdrHw-0004Bw-4v; Thu, 20 Jun 2019 07:15:16 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E446F200B4CB3; Thu, 20 Jun 2019 09:15:14 +0200 (CEST) Date: Thu, 20 Jun 2019 09:15:14 +0200 From: Peter Zijlstra To: Vineet Gupta Cc: Eugeniy Paltsev , "linux-snps-arc@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Alexey Brodkin , Jason Baron , Paolo Bonzini , Ard Biesheuvel , "linux-arch@vger.kernel.org" Subject: Re: [PATCH] ARC: ARCv2: jump label: implement jump label patching Message-ID: <20190620071514.GR3419@hirez.programming.kicks-ass.net> References: <20190614164049.31626-1-Eugeniy.Paltsev@synopsys.com> <20190619081227.GL3419@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 19, 2019 at 11:55:41PM +0000, Vineet Gupta wrote: > FWIW I tried to avoid all of this by using the 2 byte NOP_S and B_S variants which > ensures we can never straddle cache line so the alignment issue goes away. There's > a nice code size reduction too - see [1] . But I get build link errors in > networking code around DO_ONCE where the unlikely code is too much and offset > can't be encoded in signed 10 bits which B_S is allowed. Yeah, so on x86 we have a 2 byte and a 5 byte relative jump and have the exact same issue. We're currently using 5 byte jumps unconditionally for the same reason. Getting it to use the 2 byte one where possible is a 'fun' project for someone with spare time at some point. It might need a GCC plugin to pull off, I've not put too much tought into it.