Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1839483imm; Thu, 14 Jun 2018 04:51:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIs9/udsRhbHan8Io0S0xWpiTR67zeXgjkMsIxbjw+ooooHBpugzD5Lx2raAwq3oQ2D9KMS X-Received: by 2002:a17:902:8a82:: with SMTP id p2-v6mr2768784plo.244.1528977115900; Thu, 14 Jun 2018 04:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528977115; cv=none; d=google.com; s=arc-20160816; b=fEkWlu8wuYBb67UlSIDtVFF5OrlS5z24xlRmhmCRVAG5w9mYMCe1arL7YLAkxgx3PX /YGE6tzfIyjdi6lFiFhsNq7jkr96QSlj1mSwg5p0v7uVwty8vAiWTIW4cpRjV6ouPfpY e3/N9u2xgvPZtXXIn3Aa0/a8MTOA6vQWJuGDGLIxtcL1nk/4ghXA+b6mZknsJZddWO1+ zx7AnsIFNAvlQwJWWEXltUUKS9D54j3jo1NXP0hYUq26Ze6kJcuVfmFfLp180A1tqcsk p53T+1nwPwNvn52jeqSX6ZjM2+HXi2/FknoFBtpOxDZoN84Tx+Pn9z+m7H42m4KlhtUm Ol/w== 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:arc-authentication-results; bh=dQqfTUrqV3Zn5Gu1LzoamN+Q/eO3VJd7G0F97ntNyAg=; b=c24pElfEgwt+7VGSYMPie21PFEo6FXDGdlwlXYpmwK0Zn1fn5lsUrnxtrV6SbEY0vU lXWft7rx1FT8dwYkU18UZB/TK8l32cUpIRNqppbEbXTjCnbZUHqwMNzvGIXdrshcWX1g 6NAsIRj3YoZ5Egxaj1CSDaaVrYgP2edigrNu6ZIgFhbK2f8fPQvISCxfqvgtYGHk+SNY cFwN5ekmj4WVhDeYieqOAQU9p6g8/Dt1+HYMOvBDLXj5C58KUyh1qagAKZog/7F7C//D 8bxc4EUBA7h3CVMfRwXmAGrgIsiMean5tKLycfhr60EQCLFhjXTVkGwZSi4XygObGI1Y 5HLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MvgrPmTW; 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 r125-v6si5095047pfc.202.2018.06.14.04.51.41; Thu, 14 Jun 2018 04:51:55 -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=@amarulasolutions.com header.s=google header.b=MvgrPmTW; 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 S1755275AbeFNLtz (ORCPT + 99 others); Thu, 14 Jun 2018 07:49:55 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:41798 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755120AbeFNLtw (ORCPT ); Thu, 14 Jun 2018 07:49:52 -0400 Received: by mail-wr0-f193.google.com with SMTP id h10-v6so6077634wrq.8 for ; Thu, 14 Jun 2018 04:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dQqfTUrqV3Zn5Gu1LzoamN+Q/eO3VJd7G0F97ntNyAg=; b=MvgrPmTWxDluIffS4YoEYmWxtqgUh3QYR7qmiFa1x8+oD9anfq7CXF3Ja4g6zDHDom WuUs6qBBjPjRfJxjwHCNTWBTvKcbPpYAvB9w/aGHfdz/JIMrJDCgV9g/DXvmx8l+MIix PZSoi/BYhwYZqjaZ2epmGVLEtR+gFSbM6Z4Sk= 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dQqfTUrqV3Zn5Gu1LzoamN+Q/eO3VJd7G0F97ntNyAg=; b=ICHjJbfvEort8UcRXppV0JItnVQkK57cZNvOVm5TYo5AVhi8E2G/bDbTxpMmes7mDC umJAnsoRo7WkZPJEVZVCuKuD+nJwkmqbnEtkDbtnuTxyvkfD5mOgWTeoPxLjZ8OJiVgP KPwxHAj74gDTWDvTh4/LB+viFCxpKlKK0HiYZX7BGGOgzvAdpAIJCvq7vT3375OTu4Qd LO+Tp4O/8BdXGhGdVWkRPzaeUTQIkWpQ/mVI+V5TIUgKNa1N3CacafxlNVx57vA4Iom2 6PYvU2sqZb0972zTMNHloXT5lLVwEFlvXsA84iO0Yvf8jNRECLBuNm/aa0ILhvAvp79i 7T3A== X-Gm-Message-State: APt69E0rDd43N0YK40Jw2pWMeXljSaVifBHdkhTxE3Q2d1Q+gLetb7Fk 7RAKuvJZAD4bu2wObD5DEMHhJi4u X-Received: by 2002:adf:b94e:: with SMTP id b14-v6mr2063066wrg.265.1528976991268; Thu, 14 Jun 2018 04:49:51 -0700 (PDT) Received: from andrea (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id i193-v6sm5559213wmf.13.2018.06.14.04.49.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jun 2018 04:49:50 -0700 (PDT) Date: Thu, 14 Jun 2018 13:49:44 +0200 From: Andrea Parri To: Thomas Hellstrom Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Jonathan Corbet , Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie , Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Thomas Gleixner , Kate Stewart , Philippe Ombredanne , Greg Kroah-Hartman , linux-doc@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: Re: [PATCH v2 1/2] locking: Implement an algorithm choice for Wound-Wait mutexes Message-ID: <20180614114944.GA18651@andrea> References: <20180614072922.8114-1-thellstrom@vmware.com> <20180614072922.8114-2-thellstrom@vmware.com> <20180614103852.GA18216@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [...] > >>+ /* > >>+ * wake_up_process() paired with set_current_state() inserts > >>+ * sufficient barriers to make sure @owner either sees it's > >>+ * wounded or has a wakeup pending to re-read the wounded > >>+ * state. > >IIUC, "sufficient barriers" = full memory barriers (here). (You may > >want to be more specific.) > > Thanks for reviewing! > OK. What about if someone relaxes that in the future? This is actually one of my main concerns ;-) as, IIUC, those barriers are not only sufficient but also necessary: anything "less than a full barrier" (in either wake_up_process() or set_current_state()) would _not_ guarantee the "condition" above unless I'm misunderstanding it. But am I misunderstanding it? Which barriers/guarantee do you _need_ from the above mentioned pairing? (hence my comment...) Andrea