Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10590406ybi; Thu, 11 Jul 2019 07:46:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxBRFyCzLnkh+IPQNy9byXZxI7D+F/xJWNyacbGQyGrziGpbrD9OYHzXShEKx6SH0CCqLO X-Received: by 2002:a63:f13:: with SMTP id e19mr4841199pgl.132.1562856385667; Thu, 11 Jul 2019 07:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562856385; cv=none; d=google.com; s=arc-20160816; b=JaYbrLOkPn6ccVqo8BkQWahddfs3ch6/12oqLFHc1F3xjpY5b8rQCh9qgiGJ1V+8mO cnYjRKRTUHgFnckuNav68YB0loYUuOUiueOL7DcpvqFQ+yZiubmxyzYVXiuOOir/rfYe U8rwwZFUD+raPWwTjqF+AuVqX3b+n/aJc5PNtrFF0z8bBf4WIEcC/QiPA0iAFn8RtwmS YSYZXm+hs7iancpvV8gwMfncZNkolP0WXw0+1Y0HGkUpNljBLbFQixiOxpThFoxa69i9 8ROz57yDsxhBm2/Fdo9R/mLC4MGxp0CPnSKERXbwI9VMSk0CTaiTwl1iGOJQ1yw8CBu8 oqpw== 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; bh=A+M9EKycY4/Na49/3ZTutvW03nTdeCovAhe5sPEc738=; b=Ev93BX5mUJX7v/SmdpZlV44xgchjGDSkcktDQJ0VaoJy0e/SXVs986xUOtkKkkpAoa ce+X0bsYXbVKdCLwQFd8cmb3zX4YlfIPjDjhaplIt67VpOa2xAzqiWL3duwcobhZkIOg 1uqwrWCzHvCr0D0+4Wwg1PkQYSOEgLlzokOr+ESvCpObbbqUhojiHOTFs+pKivZJ85Qu Ojg81Asy3ROebEj4Qe6ZDDeNndXyHKDO/YAOdN/XXa0XpQ/eH/yVG+2IJWkGERDKQ5Lr 58LIkooBW5addrP5T9FfzfK74+we+Swl4YeUyAV1WB0sFTHIOwyAbLvyAK/OrOUpQK7s QSeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DWaYAaHL; 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 v27si5310676pgn.14.2019.07.11.07.46.10; Thu, 11 Jul 2019 07:46:25 -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=bombadil.20170209 header.b=DWaYAaHL; 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 S1728486AbfGKONw (ORCPT + 99 others); Thu, 11 Jul 2019 10:13:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59354 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbfGKONw (ORCPT ); Thu, 11 Jul 2019 10:13:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=A+M9EKycY4/Na49/3ZTutvW03nTdeCovAhe5sPEc738=; b=DWaYAaHL39mYbsCRqEJ3S1QQ7 P02squV/NBUTgulBtI4yUhtjhZPbXviXwn5cZ64a18nBrxMDqHZ9sjyzYhy8rrWsIGViUL4cuiFNR 13jc9CGjCkCg9vUQQobNtgkPofyl56m4PinPfQAT8yXfkSrKa7TQw4y6e8ow4U8TMK37DxOKX3CX3 TtYqXc/uTk7W5yiypMbcKX93JyA6IotJW3FcTmtHuDWAS30qOioSZlpdonSH/3GJq3YRLQ3nWrWuK /tXAoQynuvEE2hyzve6v52C027MqCmg4zh1ItcUY/JouC54bRwId30BRrUhafL+gbKxIhAS5QCvkO 4gn8QmF5Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hlZpW-0001Os-V6; Thu, 11 Jul 2019 14:13:50 +0000 Date: Thu, 11 Jul 2019 07:13:50 -0700 From: Matthew Wilcox To: Jan Kara Cc: Dan Williams , linux-fsdevel , Boaz Harrosh , stable , Robert Barror , Seema Pandit , linux-nvdimm , Linux Kernel Mailing List Subject: Re: [PATCH] dax: Fix missed PMD wakeups Message-ID: <20190711141350.GS32320@bombadil.infradead.org> References: <20190704032728.GK1729@bombadil.infradead.org> <20190704165450.GH31037@quack2.suse.cz> <20190704191407.GM1729@bombadil.infradead.org> <20190705191004.GC32320@bombadil.infradead.org> <20190710190204.GB14701@quack2.suse.cz> <20190710201539.GN32320@bombadil.infradead.org> <20190710202647.GA7269@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190710202647.GA7269@quack2.suse.cz> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 10, 2019 at 10:26:47PM +0200, Jan Kara wrote: > On Wed 10-07-19 13:15:39, Matthew Wilcox wrote: > > On Wed, Jul 10, 2019 at 09:02:04PM +0200, Jan Kara wrote: > > > +#define DAX_ENTRY_CONFLICT dax_make_entry(pfn_to_pfn_t(1), DAX_EMPTY) > > > > I was hoping to get rid of DAX_EMPTY ... it's almost unused now. Once > > we switch to having a single DAX_LOCK value instead of a single bit, > > I think it can go away, freeing up two bits. > > > > If you really want a special DAX_ENTRY_CONFLICT, I think we can make > > one in the 2..4094 range. > > > > That aside, this looks pretty similar to the previous patch I sent, so > > if you're now happy with this, let's add > > > > #define XA_DAX_CONFLICT_ENTRY xa_mk_internal(258) > > > > to xarray.h and do it that way? > > Yeah, that would work for me as well. The chosen value for DAX_ENTRY_CONFLICT > was pretty arbitrary. Or we could possibly use: > > #define DAX_ENTRY_CONFLICT XA_ZERO_ENTRY > > so that we don't leak DAX-specific internal definition into xarray.h? I don't want to use the ZERO entry as our conflict marker because that could legitimately appear in an XArray. Not the i_pages XArray today, but I hold out hope for using that in place of the DAX_ZERO_PAGE bit too. That's going to be a bit more tricky since we currently distinguish between DAX_ZERO_PAGE and DAX_ZERO_PAGE | DAX_PMD. However, the XA_RETRY_ENTRY might be a good choice. It doesn't normally appear in an XArray (it may appear if you're looking at a deleted node, but since we're holding the lock, we can't see deleted nodes).