Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1086686imd; Thu, 1 Nov 2018 10:01:43 -0700 (PDT) X-Google-Smtp-Source: AJdET5c/p3RyycjHkm9jKOMPYftBSsTgOpgxT7YxVw3mHOER3E0Tmn9qvREw1o6QpT1cKFPbMbOn X-Received: by 2002:a62:8288:: with SMTP id w130-v6mr8428396pfd.68.1541091703552; Thu, 01 Nov 2018 10:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541091703; cv=none; d=google.com; s=arc-20160816; b=VmnWdnCbt6A5le1B5W/1V+6Y2ba+2+LaYAWKVpqPtai7U98QsL3wkLaRAu8MaQZCiM k/KJzQIKUVRMrtEHtIpoFGFQqpjx2t1j0JdY5nvw2skZrD3gX7zqDesjq5tFIWUtG3iM +VxLofvT+pz2GaAOSc+uG8Y15fHHUfv+Mx+vXEksQ8cG3I0BH0RAjlMNHptxspM2FY2e 8vXDPYMyv8Kzh84I54OokU+p+/4aM5i9Zb7BfTr3JYJ3vSwRTO5F8QGkfclyv66vvmlH VqAPLJeUonShXSyWNd/pXbZ7RzI4FrLhphNBEe6SjJfBAzIdVrDKdQZw6JJN5ySAdF32 t+eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=uiasgtM/p2VjObQyowWTRMYBJV4UN1vpzjydvWmpilw=; b=DO1SIc2+Yd0jwXW2mZc2/ICEolVTkaG/fCo5xfkAarT6zDbLfzZKwxozfDJiRxA8BH wh8IhuKmQ5p9oR116FHdIP+fuy/2y1A24xzkAUeJY8nbKGgNWrEmpnQuQfqPG61bX8wF RsCHB1Rpm1p64g49z6c5JO1XbX+cqR2IcoFpmsaIzoTkf+R71TXuHvBGy6VziZ7pCR1S uyxnjt/aTyUR7Kg48zq1Z1jEsLWx0vx18tpLydmN69tivt2Z7u2LARVUlOtsR2sE6rXd c9wA1a/2X3UhOvmsqXWfMNHsHitnoV1jCGSCGkHRrjqCYyY7B7h1gWEE4T7Sq24HI4mB Jt8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CsL5aqC3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o13-v6si32939391pgm.513.2018.11.01.10.01.25; Thu, 01 Nov 2018 10:01:43 -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=pass header.i=@gmail.com header.s=20161025 header.b=CsL5aqC3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727256AbeKBCD2 (ORCPT + 99 others); Thu, 1 Nov 2018 22:03:28 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41439 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbeKBCD2 (ORCPT ); Thu, 1 Nov 2018 22:03:28 -0400 Received: by mail-pg1-f196.google.com with SMTP id k13so978408pga.8; Thu, 01 Nov 2018 09:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uiasgtM/p2VjObQyowWTRMYBJV4UN1vpzjydvWmpilw=; b=CsL5aqC3fgiWUT/vnO3c3Iz6dowQUJGH0LtWvq37CQkceZVg7q9lfb2nJokjeut3eg uutEzFXPiRF2SuEDNe2tOGJKEA0GpbIi8xfgI3bb5neR91zQr0opxUxOoe0FdWE849nL ThYqgTV7KEg6hDd0vXnCAUXj/zZbx3bwxlwqUd8G9+1mw8Hrepwn695WW+cHC11z6UTk B/sCZmZHaElfOybrgyjSqI/jzdQLygz8ed7V5A1XiKETD/2kKExaQPTlAuirLMj7Ucv8 +8bGff0edSwtGLkq56+AGyWh5lVKRWshTvFVXf5FSn1hQOog04TCVgw+d04fvk5y51bK PsdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uiasgtM/p2VjObQyowWTRMYBJV4UN1vpzjydvWmpilw=; b=cjmnfm3f8re4hmvA0J2BlGBDAV82aK+fGS79Dx0d0Y24pQab48pwyQwdcnJRnAnxnd 4oSJcpbsNCOPKy4ct20oO0uByYuoi1OsOvv7rFce2GAsaYop2c7Hrw8TuwMnCEPHgfvE DIzH4PxQSZ1ppFz+oZ952gWNzV18YbWLcks3ODuBV0bojM9lhS5CcZL618tWSPtN1Jmr LQ/6xvLcHkqdvpCMD1Fx/N3ji2gpe2lxFVDayryca4eyYJwHvy04W+TYsqIPlwug/tjG niH+1a7G+4lDNslqE+iXwXfKwF9zGDFfWiIi/tOdjSypjUOwvBDp9q+iYdoyuMUNDTWY RRKg== X-Gm-Message-State: AGRZ1gK04vvZFzhLu2WzHUaOUteE+0kWsFGa40qsl4CDfXdH2WnIQ4gK rW7VyRXsrOxsbX0EhYrBUp4= X-Received: by 2002:a62:9f90:: with SMTP id v16-v6mr8498448pfk.207.1541091580382; Thu, 01 Nov 2018 09:59:40 -0700 (PDT) Received: from ?IPv6:2620:15c:2c1:200:55c7:81e6:c7d8:94b? ([2620:15c:2c1:200:55c7:81e6:c7d8:94b]) by smtp.gmail.com with ESMTPSA id u62-v6sm53459766pfu.69.2018.11.01.09.59.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Nov 2018 09:59:39 -0700 (PDT) Subject: Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed To: Peter Zijlstra , Trond Myklebust Cc: "mark.rutland@arm.com" , "linux-kernel@vger.kernel.org" , "ralf@linux-mips.org" , "jlayton@kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "bfields@fieldses.org" , "linux-mips@linux-mips.org" , "linux@roeck-us.net" , "linux-nfs@vger.kernel.org" , "akpm@linux-foundation.org" , "will.deacon@arm.com" , "boqun.feng@gmail.com" , "paul.burton@mips.com" , "anna.schumaker@netapp.com" , "jhogan@kernel.org" , "netdev@vger.kernel.org" , "davem@davemloft.net" , "arnd@arndb.de" , "paulus@samba.org" , "mpe@ellerman.id.au" , "benh@kernel.crashing.org" , Paul McKenney , aryabinin@virtuozzo.com, dvyukov@google.com References: <1541015538-11382-1-git-send-email-linux@roeck-us.net> <20181031213240.zhh7dfcm47ucuyfl@pburton-laptop> <20181031220253.GA15505@roeck-us.net> <20181031233235.qbedw3pinxcuk7me@pburton-laptop> <4e2438a23d2edf03368950a72ec058d1d299c32e.camel@hammerspace.com> <20181101131846.biyilr2msonljmij@lakrids.cambridge.arm.com> <20181101145926.GE3178@hirez.programming.kicks-ass.net> <20181101163212.GF3159@hirez.programming.kicks-ass.net> From: Eric Dumazet Message-ID: Date: Thu, 1 Nov 2018 09:59:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181101163212.GF3159@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/2018 09:32 AM, Peter Zijlstra wrote: >> Anyhow, if the atomic maintainers are willing to stand up and state for >> the record that the atomic counters are guaranteed to wrap modulo 2^n >> just like unsigned integers, then I'm happy to take Paul's patch. > > I myself am certainly relying on it. Could we get uatomic_t support maybe ? This reminds me of this sooooo silly patch :/ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adb03115f4590baa280ddc440a8eff08a6be0cb7