Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2988520ybx; Fri, 8 Nov 2019 12:19:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzs4X4KrulV40HV7Q6U7AjhP218EboR3BYdk5KJegb2mTDEksJlFzNQT7ZpmDBhPBDK3Kmf X-Received: by 2002:a17:906:751:: with SMTP id z17mr10433287ejb.313.1573244388360; Fri, 08 Nov 2019 12:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573244388; cv=none; d=google.com; s=arc-20160816; b=yqW9ZCBrC1ma74vqGfmTijoDAJ928yKrGSJH5vjCXQjsoKjDTQVdgWus7NT4Juq3zh /je5pe9XCceA578pVhYj6eR8vF/QQog3obiF3R2eSE8fLuWfvvu3eUlJfxMpdbTjXbWO fsnKBC41D6Q7Tx36sS6QM5nV79W50alm9atqAtUQVcWyvCfdYqvdwTvaic/DvLu8lbYE SrGD+uq9BsBnHuoEUjnXNfCw7QrXldj4D9Jr1p/HTe6ZIC2b7aZGfIG3h1O1xQMRVChy Dxp6F2MuK/BiDdPUBGH1UOXY790s/uWzGLAEYm/JMuX3krpkv3dDjfcLQrMMIoGFG/Qr 8QBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FDDCgDX90thNxxfNAJr61/C3QsaQDVp61gK+9DADaCE=; b=N95N7lB7viQj9RJS22ZDSEHTTfyBbx7whlDZkExVy+XU6g3N+Wf1srfIFObTnubXd2 +qpcw3ELsZN+k/JhStIDgSFdA6m/jHNS1a4SoBuWdKwt3wPBH+biFLWPyqG4IEGXeZYr jIQ9cJz0zIjDr6OhmeCMK8WA7qEJry/DE1o9ZYsCAVZTYfoWVrkpGOctyHWxjI6XjA8j RSCPHJaKKhDllTVLOJEoQVCRvEj4Vx1Ye+xYkLU+MRw0L3BbuP+r5QQsfKvAqDEEM9c+ y0PuOW8Sk+QiccxACFFD4PWZ+6VuO8iBjLowIB1HMd8sR7nVO22NM3lp2VIz8J5sg8nk jpRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="GR0/8SrV"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si4605583edq.227.2019.11.08.12.19.24; Fri, 08 Nov 2019 12:19:48 -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=@google.com header.s=20161025 header.b="GR0/8SrV"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727633AbfKHUSC (ORCPT + 99 others); Fri, 8 Nov 2019 15:18:02 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:34829 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfKHUSC (ORCPT ); Fri, 8 Nov 2019 15:18:02 -0500 Received: by mail-il1-f194.google.com with SMTP id z12so6257548ilp.2 for ; Fri, 08 Nov 2019 12:18:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FDDCgDX90thNxxfNAJr61/C3QsaQDVp61gK+9DADaCE=; b=GR0/8SrVdiMBYUxZ534C7fSRxxw3md46Vi65wd536ugg0UKVh9jxmRB2m+zW+t8wv0 t13oNPqVr5XqneEG1AQf+FMgHV6CR8CFUqVwCWtsd0fadxpREq0ttBPzhHh5YSvqh0Zl DkKC6nqf3HbKLNmyZyA3VzPBWFgGXnNvmcCLiufmHELygQhP6GPvRU3xw2zRfIZNhgd+ wS1zcSbZ8T54SMqCJhJAH3x5v7zxbw9nBcK0BFax4wqlm5mOSnFXox0CMJRqnXk2TIC4 yWM36tBjzxpughTm7tytzKQCD5AupU263+QKvP/1D8B1Hf9tNb53DsPvx0IvbaipojRG X2ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FDDCgDX90thNxxfNAJr61/C3QsaQDVp61gK+9DADaCE=; b=tUEdnumQbR1F7qWEK8ben+kSsBRW35FDCYcdBSJUIQTVoCu1ZVCc58qlRkDIpUo4J8 Nhctc3IuvzPg/RsslVfmuAcuCgnJ2q545QHRiEvtYNPj0qc5HDNNzfUd75b/Mg8qFyqr lZQOy8ZU1hcFZKEUdMWlUbMT9m1JQRByGOI/uRhdLUEWPXnZQTnSl7LzBhLxyGjXRXRG /ECYmO2s5dTDd4/WzY7MkCg0HgbVNcAZVFGD4hlX3De+8xUw/anQULhIyblMHgT01cXD 3eg7GRybsu2pi+3gbR+HjBBB+IcGedtPaDFoCLP5YoDc74n6kuqD4a8yAcuXpl2/cd3H 7xpQ== X-Gm-Message-State: APjAAAVXh0Fs3S37W1irNSrKHWVKI0OyF9R+tSJrf0Al3KJ0I0mp/kkF TBz+TdeyqB7v2byOPndzEnTdUvGgGi3u798AYNBOFg== X-Received: by 2002:a92:109c:: with SMTP id 28mr14803599ilq.142.1573244280924; Fri, 08 Nov 2019 12:18:00 -0800 (PST) MIME-Version: 1.0 References: <20191107193738.195914-1-edumazet@google.com> <20191108192448.GB20975@paulmck-ThinkPad-P72> In-Reply-To: <20191108192448.GB20975@paulmck-ThinkPad-P72> From: Eric Dumazet Date: Fri, 8 Nov 2019 12:17:49 -0800 Message-ID: Subject: Re: [PATCH 1/2] list: add hlist_unhashed_lockless() To: "Paul E. McKenney" Cc: Thomas Gleixner , linux-kernel , Eric Dumazet Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 8, 2019 at 11:24 AM Paul E. McKenney wrote: > > On Thu, Nov 07, 2019 at 11:37:37AM -0800, Eric Dumazet wrote: > > We would like to use hlist_unhashed() from timer_pending(), > > which runs without protection of a lock. > > > > Note that other callers might also want to use this variant. > > > > Instead of forcing a READ_ONCE() for all hlist_unhashed() > > callers, add a new helper with an explicit _lockless suffix > > in the name to better document what is going on. > > > > Also add various WRITE_ONCE() in __hlist_del(), hlist_add_head() > > and hlist_add_before()/hlist_add_behind() to pair with > > the READ_ONCE(). > > > > Signed-off-by: Eric Dumazet > > Cc: "Paul E. McKenney" > > Cc: Thomas Gleixner > > I have queued this, but if you prefer it go some other way: > > Acked-by: Paul E. McKenney > > But shouldn't the uses in include/linux/rculist.h also be converted > into the patch below? If so, I will squash the following into your > patch. > > Thanx, Paul > > ------------------------------------------------------------------------ Agreed, thanks for the addition of this Paul.