Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4372514imm; Fri, 18 May 2018 04:08:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoiCbeTtztv4oMvy8HaQDeu5zRymkOD3aW7ObRyNInieK6lFlyklALdY6Tf9QqReIIIw94G X-Received: by 2002:a62:e710:: with SMTP id s16-v6mr8970769pfh.227.1526641732897; Fri, 18 May 2018 04:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526641732; cv=none; d=google.com; s=arc-20160816; b=ltOEjqwtr2JWUEPvUgQlQXlUNDNSasJZ3pUkVLX9qzjR6AnbP9RRpxM7yBkqamQD9S rJLt5IFkFNlQRbkr+YafZRTOoufHWmQAQJaoUc7VRAGjWWiGqEIyvtOGZnfsTRBbjlVJ FFKnTn9x9WmuOuA2mop1q1fPQh9SbZKQlMgo0/4jjUgmN7q1iun3RwdCTob4U9LHiwQx 20K27EIoqAVpoCZRBkV1ChjhMFLX9ByHDWPW+CGGekQDLfyCD1CPb38qOjZRVJYZb3R5 6xyD/6BOIh/WgGFlzYCroe9W8qqpKrYupSktd+QeFUEPuepNEOx8olLOdXk+bAuc2fU5 Nzng== 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=KXYJoMkgWQX6pYfscKOuf82naOSlh1V1jgA0REBU7Z4=; b=y2KUhQb26dI8yIBunkuY0XWMtfeZpTfDuxrSKXvIJRSVoJhrVVDvPXwSUT8UcNhxVC SpvN3nX90nHRnPiWtqUD6lm/rRtVZQHPUbgmzcosI/ijN5+oGtbgK+sEfU2L1eTqNpwl +8yDkvff4v8CVduO8d4rb0/n6HApe0M4JUiI9I5Kb/FF0giHd4awt6YBtZUXN2b5ZPkG wkfA6Pa/1M9oQowWfdG8htsafDU1Ak6TgTItBehRFEwdoGKg8oG0LL+nqDGDAgeI+3aw g2fQUvMefCDgnSHofW73ojIRH/pdgOPSaFhnm+W6XbUIUvbWy6B9T3Hpuei2UTg3Qsus pmsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=3Rii14X5; 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 c131-v6si7201012pfg.108.2018.05.18.04.08.37; Fri, 18 May 2018 04:08:52 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=3Rii14X5; 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 S1752374AbeERLI1 (ORCPT + 99 others); Fri, 18 May 2018 07:08:27 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36492 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751446AbeERLIZ (ORCPT ); Fri, 18 May 2018 07:08:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KXYJoMkgWQX6pYfscKOuf82naOSlh1V1jgA0REBU7Z4=; b=3Rii14X5zvA5md8Mgmu/xqPYg Z/sEFXj9W61+/AJEHLEAjtZyDzKYzK6cahOmnkga1ML+xYGTlnotKoTcOm3KznNAEKI5h1syhnUt1 I84Bg7e5rBOnLwe0e8CRhehwL9sMdxG4LnIzrvXewqwGUqGj7MfP8i//ox/m9EdUKAIKQiu99QWgc 2dyHM1AMFKnTMB/KT6Gg3yo7ZBUIPccvkfYvqHQaV33k/lEArkrShr89TP4lmsKfZdV0/cD0AU/8C uwVzuzdAv0DzhTL1imxk9bNW+kEZHxKLdvfnDl7Dpa7dBD3j3RwX20sMtHkHhhMpcezBZ4tMo6h57 mdv0Uj/JQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJdF5-0005F2-1W; Fri, 18 May 2018 11:08:11 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 735CC2029F870; Fri, 18 May 2018 13:08:08 +0200 (CEST) Date: Fri, 18 May 2018 13:08:08 +0200 From: Peter Zijlstra To: Kent Overstreet Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Dave Chinner , darrick.wong@oracle.com, tytso@mit.edu, linux-btrfs@vger.kernel.org, clm@fb.com, jbacik@fb.com, viro@zeniv.linux.org.uk, willy@infradead.org Subject: Re: [PATCH 04/10] locking: export osq_lock()/osq_unlock() Message-ID: <20180518110808.GH12217@hirez.programming.kicks-ass.net> References: <20180518074918.13816-1-kent.overstreet@gmail.com> <20180518074918.13816-9-kent.overstreet@gmail.com> <20180518095204.GF12217@hirez.programming.kicks-ass.net> <20180518101804.GB15403@kmo-pixel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180518101804.GB15403@kmo-pixel> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 18, 2018 at 06:18:04AM -0400, Kent Overstreet wrote: > On Fri, May 18, 2018 at 11:52:04AM +0200, Peter Zijlstra wrote: > > On Fri, May 18, 2018 at 03:49:06AM -0400, Kent Overstreet wrote: > > > > No.. and most certainly not without a _very_ good reason. > > Ok, can I ask why? Because it is an internal helper for lock implementations that want to do optimistic spinning, it isn't a lock on its own and lacks several things you would expect. Using it is tricky and I don't trust random module authors to get 1+1 right, let alone use this thing correctly (no judgement on your code, just in general). > Here's what it's for: I'll try and have a look soon :-) But does that really _have_ to live in a module?