Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp829268pxk; Wed, 23 Sep 2020 18:11:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh2HjVFTqE+yy48akLYLrGhD8+tYlKo/bb/NTnRd1rmLarxD5myS/bTSI4pnU9qk7n61uM X-Received: by 2002:a17:907:2506:: with SMTP id y6mr2146686ejl.265.1600909860081; Wed, 23 Sep 2020 18:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600909860; cv=none; d=google.com; s=arc-20160816; b=E8VFkfI86Ns0ltQABZ6l7RSyFtLafRXpLfAOGO9g1cNL/GMt7AtDfpBMYa4eOBovGY UyA8yypYtjY/pwg6NAC2u6z/RFerbcbHo8eKg1wPs5zuEGSrEn1xWmOkriZemBAhEEkw yfl1bAYcvNyikjWs8WaMQDukUGpu+kPFwfG9PFOZtl1IVib2+dghktbfdRNpPimsDob0 8iIuCrJhW5Xhjotg9juj4OGEhphRaqWKsi4InvVXVnicWLcw3I6k3PJ8FolkCede1/FI 5Gp4NKjsfbWw92WIAADoT82W7LdJbE5fksPWLuob+7YkirSCeR7HTL+6MExbKoLYWW4Z ZX6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CpRt9L3oSpo9XB/wJ4tlJ8BLy+Ga6XgFjsS66dr9R/g=; b=uPA682eZoYCuyzdrTpuuzM5Vz83OzyyctlFGFKd/v+sViF7UZnh7oQvKMc6KLWZCNR rsOcKfFhktkoDB8xe6pTH34bAqOrpgBwlGHo2HUB+3sdzKkM/SVHE4KPdgo4jVZ9mZ3/ re1IAr/orvuqPSVlTRP+ot3XBzoPj/fKpxk8lHcfgOuAFoTdcWCI2uyqCJyGLjQSXlPI vQAk3OGId+WYrMZlJE3cIlZb932/v62OK2IcHqWQ4NNYrv7yZkKOdxT4I65ixEznxH/s m7XG94NI7dY26UtCagafDlMcUuOqRQ3mCtAWbgYZic7XbRLkJ1jJb7BR2+j2pR5mHxfd +xgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wC6+TkHq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si1070272edk.57.2020.09.23.18.10.36; Wed, 23 Sep 2020 18:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wC6+TkHq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726850AbgIXBHd (ORCPT + 99 others); Wed, 23 Sep 2020 21:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbgIXBHc (ORCPT ); Wed, 23 Sep 2020 21:07:32 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3D02C0613CE; Wed, 23 Sep 2020 18:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=CpRt9L3oSpo9XB/wJ4tlJ8BLy+Ga6XgFjsS66dr9R/g=; b=wC6+TkHqrGD3haqlkJx8wiylpt OieNI52BAZTw2567ZzFYTGBthskGEQQUw+uqPH+4AqIqB6vJ79XAuZhXWhZeCTeeAKqgMTM8XSn85 HYyTGODlwKP8hCgVqZgicVfUJ3VkLIFimHr1Dih+ycnp3HzkwcxJWqhw/vxFrmc+9rlDcfz5rnvgW 5W7vt7CczMfqoovNsSSXln0UzWYqaitlwBC/WvhjD1QJZ93mMwQwzs1tS0KO5u5VHqTxw3bbIKo7h PQ57lVkX8p4vRfaHvUjf9seoE7o6023/TX0nSweYVUHOiA+PA3WB9xLdwEZhT92DgVKGKR2xKE9kZ y0oraI7Q==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLFjN-0000zh-0A; Thu, 24 Sep 2020 01:07:29 +0000 Date: Thu, 24 Sep 2020 02:07:28 +0100 From: Matthew Wilcox To: Qian Cai Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Darrick J . Wong" , Christoph Hellwig , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, Dave Kleikamp , jfs-discussion@lists.sourceforge.net, Dave Chinner , Stephen Rothwell , linux-next@vger.kernel.org Subject: Re: [PATCH v2 5/9] iomap: Support arbitrarily many blocks per page Message-ID: <20200924010728.GS32101@casper.infradead.org> References: <20200910234707.5504-1-willy@infradead.org> <20200910234707.5504-6-willy@infradead.org> <163f852ba12fd9de5dec7c4a2d6b6c7cdb379ebc.camel@redhat.com> <20200922170526.GK32101@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922170526.GK32101@casper.infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 22, 2020 at 06:05:26PM +0100, Matthew Wilcox wrote: > On Tue, Sep 22, 2020 at 12:23:45PM -0400, Qian Cai wrote: > > On Fri, 2020-09-11 at 00:47 +0100, Matthew Wilcox (Oracle) wrote: > > > Size the uptodate array dynamically to support larger pages in the > > > page cache. With a 64kB page, we're only saving 8 bytes per page today, > > > but with a 2MB maximum page size, we'd have to allocate more than 4kB > > > per page. Add a few debugging assertions. > > > > > > Signed-off-by: Matthew Wilcox (Oracle) > > > Reviewed-by: Dave Chinner > > > > Some syscall fuzzing will trigger this on powerpc: > > > > .config: https://gitlab.com/cailca/linux-mm/-/blob/master/powerpc.config > > > > [ 8805.895344][T445431] WARNING: CPU: 61 PID: 445431 at fs/iomap/buffered-io.c:78 iomap_page_release+0x250/0x270 > > Well, I'm glad it triggered. That warning is: > WARN_ON_ONCE(bitmap_full(iop->uptodate, nr_blocks) != > PageUptodate(page)); > so there was definitely a problem of some kind. OK, I'm pretty sure the problem predated this commit, and it's simply that I added a warning (looking for something else) that caught this. I have a tree completly gunked up with debugging code now to try to understand the problem better, but my guess is that if you put this warning into a previous version, you'd see the same problem occurring (and it is a real problem, because we skip writeback of parts of the page which are !uptodate).