Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3744117ybc; Thu, 21 Nov 2019 13:03:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzXCaCKvyDEbacGCr0Fui4UWNWLGNAYwF4laAGlcUj57/t9tBS0OfJiWxiENI/MaQ9S8ZfF X-Received: by 2002:adf:e911:: with SMTP id f17mr14097955wrm.300.1574370235529; Thu, 21 Nov 2019 13:03:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574370235; cv=none; d=google.com; s=arc-20160816; b=tUpPVDm6vzRpIRYH+wT2nmViRAi6rgW/sCicGEFHOX98n5y/dFbSUdgKUuDtEHlalZ 12tCTCo/aXMeROwysS26EeyOmsiawq16fVZcNKBoy1I6JRF42oY+oHrVTNxdGm2C0o+e oDLYyWlsSjHPoXmO5wPwYaKllsN2r1ypLjo3K6PCHjAbxZZkq6mxVVja/gtveCxqHcPp X/jNYp2ETLUTBccs7j6DvBRPUcWUXn0oJXhj0jurp4UgmkZwtTBVx3KwljzUpkMi4tPN VFpnY2LnnSVcEUKeVp2kxd0Wx3wNn1pKuRygLyCJD02PpH0k6a7xSb8M9JiWJHs2GjmA RPkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=SWPOTYcfPM+SmySXP2izUP7lqeFLHCTV1Gr5PsBRZds=; b=Cl7Mn4vUROop8PTUDr9OQ5++l2vpbcXZPoOFe3uaCUka9wseN+qh1k+PBMmrx5z4U8 /hgV19DmZAQ690TG/qwZ+i3ko/0IkYBye1/fDrQtMHz5vK5QF8tQb5t/171hWDhwFp2r nH97sw85NCI/6yrKUl1CuB5NQmhYoCNUs7Z9PXqEW7/FZlpBNWPQDd8ERCr/3HmVwfo/ f36v+b4tP8ggYXzyCiujMBQkOLJJnOGI9A6DZC8kyJTx2Ed8vCs9m5nSGPQiRqHOQk8l E0Fx+8xZUA6e2ZVnR3IcNPy1udsP8pXeuvhBVFYPtk4vH3I0TBIhmetz9O4TBZmQvLMg +fyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=p41EzjMB; 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 f24si3033560edf.15.2019.11.21.13.03.31; Thu, 21 Nov 2019 13:03:55 -0800 (PST) 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=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=p41EzjMB; 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 S1727031AbfKUVBL (ORCPT + 99 others); Thu, 21 Nov 2019 16:01:11 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35896 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbfKUVBL (ORCPT ); Thu, 21 Nov 2019 16:01:11 -0500 Received: by mail-pf1-f193.google.com with SMTP id b19so2358769pfd.3 for ; Thu, 21 Nov 2019 13:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=SWPOTYcfPM+SmySXP2izUP7lqeFLHCTV1Gr5PsBRZds=; b=p41EzjMBwbH7maExHnalWSvYQ/MmKaQzJXRUb2PtI36n/V3veqyEcpvGJtqE/fuCNh ZrSQwEKkOiY4HLEro+A7ic74b4eVxoxOifVcKYxgviB7QfyQz40HNifDXNTliqilhl2f mY/dA7JH3P6cOleWZ645B6lf0xxXMzIYn0JK6vlZgAI3ufL9VOqOqfrkBYB6BFV5PMnU ArHFZmt2kqPluePU4mkN3yCXUGxgq1Tk5feh1yaCIJtZ9RSYG564rmkcRUvJ3JS93sWg rZPGBMKDbJPI3fvZTWBC89fnAJZCFVv4vyAyn3unsCSwDxIdzt7WIR5A4SWZRIAxgzhl M7rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=SWPOTYcfPM+SmySXP2izUP7lqeFLHCTV1Gr5PsBRZds=; b=IolYvpLFTBp4ZefWlljjtu6Tl+6aAg1/5ZVFYk1aR4kiuXjO7cGM1B0/GPmkqA6sQ3 C/y4H03d4V7x5HrSAWDEuownYScxR8YUEERUIHNe3yX+CZDYrs4Ry2Q8DftSL9NvFhNp 1fgnNVNwI5GXvRrD4Rk43aSGU4vVYtDpWXZUlw7ctGgEgegcWwkxY2NAlmZu4Bwi9dTM ju/zpJIb15tL90SqSaPOvyBQBA5RI6zQHQHztJGirg+IkSEq4q2kg307Rjsru4sdtWnn WAdEzhw6YsI1K6cTvBGRJwR2epU52I/dJn0l0PXHDILuNtO6N5h9wvCrCxSXeawFSZn7 n6lQ== X-Gm-Message-State: APjAAAXS7VRq5rNtk76686DIuZwZBfVrua1SGWgbR8lTD5JCLSwzdSmD YAXGKemmuRa45jUtXCnNitYtew== X-Received: by 2002:a63:f94e:: with SMTP id q14mr11769288pgk.411.1574370070419; Thu, 21 Nov 2019 13:01:10 -0800 (PST) Received: from ?IPv6:2601:646:c200:1ef2:8037:4908:32a8:6a21? ([2601:646:c200:1ef2:8037:4908:32a8:6a21]) by smtp.gmail.com with ESMTPSA id s26sm4397741pfh.66.2019.11.21.13.01.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Nov 2019 13:01:09 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter Date: Thu, 21 Nov 2019 13:01:08 -0800 Message-Id: <066A48B7-296F-4953-89A6-588509FC0303@amacapital.net> References: <20191121195634.GV4097@hirez.programming.kicks-ass.net> Cc: Andy Lutomirski , David Laight , Ingo Molnar , Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Tony Luck , Ashok Raj , Ravi V Shankar , linux-kernel , x86 In-Reply-To: <20191121195634.GV4097@hirez.programming.kicks-ass.net> To: Peter Zijlstra X-Mailer: iPhone Mail (17A878) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 21, 2019, at 11:56 AM, Peter Zijlstra wrote:= >=20 > =EF=BB=BFOn Thu, Nov 21, 2019 at 09:51:03AM -0800, Andy Lutomirski wrote: >=20 >> Can we really not just change the lock asm to use 32-bit accesses for >> set_bit(), etc? Sure, it will fail if the bit index is greater than >> 2^32, but that seems nuts. >=20 > There are 64bit architectures that do exactly that: Alpha, IA64. >=20 > And because of the byte 'optimization' from x86 we already could not > rely on word atomicity (we actually play games with multi-bit atomicity > for PG_waiters and clear_bit_unlock_is_negative_byte). I read a couple pages of the paper you linked and I didn=E2=80=99t spot what= you=E2=80=99re talking about as it refers to x86. What are the relevant wo= rd properties of x86 bitops or the byte optimization?=