Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp572383imu; Thu, 22 Nov 2018 02:03:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/WI0okY2E9dm4EHa7+lU35zGkZCfezdLuk9dlJAjENUoZe07uCyNP7SyTaPMF3CE060zP39 X-Received: by 2002:a63:c42:: with SMTP id 2mr9493655pgm.372.1542880993177; Thu, 22 Nov 2018 02:03:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542880993; cv=none; d=google.com; s=arc-20160816; b=i0nDqA5tBnslC4zHOllwP3vkHy6Ec2q5TUsykxxIg2sCNdrOp9bqe7kjz15UKcOKUp 4zLnWxEdecqs73LvY681ww6tWSo8lX5L1UhJGM0dQcN6pzAosH9wnahxYGD/ETktTzml iI02ZHhKM1GxEaNgnIOZsMpZOazGta8LZJ3845yxmJIU3JFcwSqzJL2XvKs8sW0fs+1A 42fOG0mPz4RDuHIHqgoW8yZxYnPyFB88UfrEOiFp+UOayybFrD3P6XNWP5x5yyvTvuFB XwtN9w/XdnJkpWY1cP9r/1cJ168u8cH5gmkIuPDUTmWBbBqEp0iHS6dY988Zw/3+ozdI ZmtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=bMUASx2iq7y+Pbk5SYxh+6ADADLMrDOiQ+6EhXlgpAY=; b=v688kRO5/7t1i1PkK6x+WP+oScDIr/nGyJNVa3tliQhBV9WqBz1/Rd3EhNM2lV4hFg 4X05TOTHIVdoPbxr80B9yaKZRJAOh/oQKj6qkhpL0wudAsV+o4ONLlL+Lm3PxdMUBRSO yjGyQScrGBoLx9tGBlsSAqPdmjKM983eMCzcd22LQQYyYI2FgTbZBd337kDdfTINwMW8 +8eLb5333eqCt6QL9v/oJ01VqDyHzRHcf/j22cG7fOrOC1k9+oXxmrak2gor7QJ88Svj znLAl4u8XYqcr5ja0skmBVLNRV2unoK9Oc0EFkaZWC/KAKdDfHWI4dBXFNHt5O+RLeUz JUdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OsQAQrsw; 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 32si28441282plg.29.2018.11.22.02.02.58; Thu, 22 Nov 2018 02:03:13 -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=@amarulasolutions.com header.s=google header.b=OsQAQrsw; 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 S2390162AbeKVJLY (ORCPT + 99 others); Thu, 22 Nov 2018 04:11:24 -0500 Received: from mail-ed1-f47.google.com ([209.85.208.47]:46449 "EHLO mail-ed1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731905AbeKVJLY (ORCPT ); Thu, 22 Nov 2018 04:11:24 -0500 Received: by mail-ed1-f47.google.com with SMTP id o10so6123332edt.13 for ; Wed, 21 Nov 2018 14:35:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=bMUASx2iq7y+Pbk5SYxh+6ADADLMrDOiQ+6EhXlgpAY=; b=OsQAQrsw/cw2JhADdaajXbyqC5orRuodCl5OGvwSPZaNn7GEHE7tVt/OIhgPRxXtYS EEkkmO1crYUyq1dMYsF5iPvxoSA6KTvy2xost1Aahs6nENLfrq39j1vxHl6gQjmuJFae v116/fMGUDpS3nFG8vTCxdFbNIK7J+sMS/30I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=bMUASx2iq7y+Pbk5SYxh+6ADADLMrDOiQ+6EhXlgpAY=; b=cEMG/nN0gO2eMSHG1i6I+1puly7Xuv7gcOi97bowrUAS/iryjCufxA+1BS0c1yNyLE hYZKduK2RrT0GJ7V222KP8vabOLjQ2slu9htDjdwCi9LqQUpgq4cq5xLC8WIiNp+gkvK XPMmWhOnU0bb7jgBeQNAcnwBA9PpXPqxH/4LlHDJ5UVq+9B4NFyNthh3aUkrZgOLehD2 ioAtviFvrrjodrqm6svZkSx1WlyBlcma+EQL+D9o/BuxkZEwW6RBRLftGEc+NHwYtLmw 2G6+Ot5MmqeigClTc1wkfGTyGHC13bL4skXAQ5sGFWRR0EOJxQrEN+Bda8DgmgpbZb9m oRHQ== X-Gm-Message-State: AGRZ1gJC96dZaGslFPn7UldCWWS2csa3wl5dm+VnWCUIJ7QBXM8766gO kAwlgb7bIb2UmZSaQwZb4uqRpA== X-Received: by 2002:a17:906:4c94:: with SMTP id q20-v6mr6367952eju.26.1542839701689; Wed, 21 Nov 2018 14:35:01 -0800 (PST) Received: from andrea (dynamic-2a00-1028-8386-da8a-eacb-c188-78b9-634c.ipv6.broadband.iol.cz. [2a00:1028:8386:da8a:eacb:c188:78b9:634c]) by smtp.gmail.com with ESMTPSA id d7-v6sm3448427ejx.68.2018.11.21.14.35.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 14:35:01 -0800 (PST) Date: Wed, 21 Nov 2018 23:34:53 +0100 From: Andrea Parri To: Peter Zijlstra , Ingo Molnar , Vincent Guittot Cc: linux-kernel@vger.kernel.org Subject: [Question] atomic_fetch_andnot() in nohz_idle_balance() Message-ID: <20181121223453.GA4016@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, The comment for the atomic_fetch_andnot() in nohz_idle_balance() says: "barrier, pairs with nohz_balance_enter_idle(), ensures ..." which, well, does sound a note of warning... ;-) I see that nohz_balance_enter_idle() has an smp_mb__after_atomic() but the comment for the latter suggests that this barrier is pairing with the smp_mb() in _nohz_idle_balance(). So, what is the intended pairing barrier for the atomic_fetch_andnot()? what (which memory accesses) do you want "to order" here? Thanks, Andrea