Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2472350ybd; Thu, 27 Jun 2019 13:00:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbRhnesAQ+P9tShl8W67pjPKlEgnk2edzFJgGOMfH62OXPjDuAwVtMzA71hvNJ+YAhGGfb X-Received: by 2002:a63:db49:: with SMTP id x9mr5297244pgi.93.1561665623185; Thu, 27 Jun 2019 13:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561665623; cv=none; d=google.com; s=arc-20160816; b=XTJV8QZ5F91fkaqp5W+cyONzWQERoPdA65iWqppIBtfO+BwqwuNwNGdgb+BknLN06V EshYgjXyU8/JSGrRQ7IDzO5c1yFm83R8DK0hsTMr8xg1HTpUJuP3DjUUHe89czLuNSQW MFsRTgaIfNQyEULiohpYzkRxDTKSVoeIewSZHcux65yXMEnjxb2ZWbospx8kgUIFRNQy h1G6CVkTKuUoUo4mxjZfRzt6K3Ntx74tXAbITipImXpaQk4/ZkKgyXNnMOuvWy7X3MpL RjXn61QBbmzvldiVIbMFB0m1b1CbUb1AlVAkx2s4iCcemlKS1l0AJwd+DnS0QVVe5YSY +/nA== 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=1zaJPISJ/EM3luyF1vz7G/5Xji346kDTt6heztPdAbM=; b=tqTZ1Z4/uorFxQcDQvNP1XRQLUMO2CW0XDx4tU5Pwdv+Nf0wFqQyvqJLTyJfAh1517 yn/fMtE2bIQVB/GQWCb+JTvDd11jZCgIuKwdb6L2d7ljcvrD5Za+06iY012uAUeJU+LO CtDTmuMqL5185qBkWLMRIUW+XfR4/EdzC8WYOlqfABsqMQbdQh7c6xYOf5DknA84AbQi oXhFGJ2TIZGqx9dRRu/evCbAwH5bDeCI/LgyID0pafrhKhdt6QyOS5cXYP11CMVqK7T4 L2dO2nRIw053D8Bz4gcynwr7X496rjoCF2XGjBPcGR+k+SbUDJnPCm8yuATw1WAi69Ga uqOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Opin+Qyd; 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 r71si5609pgr.518.2019.06.27.13.00.06; Thu, 27 Jun 2019 13:00:23 -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=Opin+Qyd; 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 S1726563AbfF0T7v (ORCPT + 99 others); Thu, 27 Jun 2019 15:59:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41422 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbfF0T7v (ORCPT ); Thu, 27 Jun 2019 15:59:51 -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=1zaJPISJ/EM3luyF1vz7G/5Xji346kDTt6heztPdAbM=; b=Opin+Qydyf8b8u+uTC3Ub0SNO bNiTRXwZJKK3vmcNgV3Q+9ZsiLEpy0Z/TptTzlqTB/at+xjh5msPBhEbfBZw2ume9YxOvHLAyj+mR vneJqGV8dfXGHd2fo6u2nzXrMquEyTDAhcs/rjOCT1tNz10efzK73Zc+asQMhIG2/TKghMpiHcCEt jQMbY9H3RIcg2UIxJBohct5anRwA9gw7fz+Rq2giBj3pqDhWPfqxDk3f6ts7XQjV6A5U21Aq3bcfP eqUCt08yZKTPer3mQ6Bg+Sly5ULCt7EJx5YiuALhtj6Cg2It6s4hByBpQujCnvyeNIeuWALavj14k pspOiFNAg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hgaYe-0007ij-P9; Thu, 27 Jun 2019 19:59:48 +0000 Date: Thu, 27 Jun 2019 12:59:48 -0700 From: Matthew Wilcox To: Dan Williams Cc: linux-nvdimm , Jan Kara , stable , Robert Barror , Seema Pandit , linux-fsdevel , Linux Kernel Mailing List Subject: Re: [PATCH] filesystem-dax: Disable PMD support Message-ID: <20190627195948.GB4286@bombadil.infradead.org> References: <156159454541.2964018.7466991316059381921.stgit@dwillia2-desk3.amr.corp.intel.com> <20190627123415.GA4286@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Jun 27, 2019 at 12:09:29PM -0700, Dan Williams wrote: > > This bug feels like we failed to unlock, or unlocked the wrong entry > > and this hunk in the bisected commit looks suspect to me. Why do we > > still need to drop the lock now that the radix_tree_preload() calls > > are gone? > > Nevermind, unmapp_mapping_pages() takes a sleeping lock, but then I > wonder why we don't restart the lookup like the old implementation. We have the entry locked: /* * Make sure 'entry' remains valid while we drop * the i_pages lock. */ dax_lock_entry(xas, entry); /* * Besides huge zero pages the only other thing that gets * downgraded are empty entries which don't need to be * unmapped. */ if (dax_is_zero_entry(entry)) { xas_unlock_irq(xas); unmap_mapping_pages(mapping, xas->xa_index & ~PG_PMD_COLOUR, PG_PMD_NR, false); xas_reset(xas); xas_lock_irq(xas); } If something can remove a locked entry, then that would seem like the real bug. Might be worth inserting a lookup there to make sure that it hasn't happened, I suppose?