Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5165463imm; Tue, 12 Jun 2018 03:45:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKICUDxhR/0VWL1nR1U+gTpdL8QrwI1tSQNXiYXhY85mL3gAlN2FsBubYLQ00M8IXDlLG4nb X-Received: by 2002:a17:902:b285:: with SMTP id u5-v6mr3539319plr.183.1528800358413; Tue, 12 Jun 2018 03:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528800358; cv=none; d=google.com; s=arc-20160816; b=rJfMzSVYDHJ2C+/jmr4zdYwGO/T0YmN74yKBt/F/Azu02iOWVaZgq4j3Pi4f2H2Jdh Q2m37VO5Mm12aT6JZyyoQQg1kPJCwSpDiZLVANY8hwUkHhNRrwWj2CMwixmBPTAXmelk 0tq53OPT35HG33uyOSpJQnI7T9FkubQhN3fNtlIhr6WXiyQe0Mzp8aU/gYPBzmfk1Ls5 K/7j0KoOitTuHsdBTtWL6+RkupdRiFRLyeeacWkUQhFkgZamNe6KyCdeRKgXdAGUcF8P qgZzo2nFvUPodd2WYJs1LV4314BA4QQR/PVQtOly9oAKHmZExB4jPTS2wSuX2qxDhm7+ 4m6A== 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:mail-followup-to :reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=Q0WgG/SRrXMSI7kXG1cEEAaNKo6HGYdhUSo9mV9jvMQ=; b=JFXCTVC9qVz7rFd10LkCEd1orwkW7Ag9hWxL0S/MpQoBW8LwkhDvDYrCLGM71vLjeG 5P3aHarvEOkZw8NBLPY5S//WOuKKdqU7LcdVn/bzPHtNXm4o+dfVrUWG1j+SCLQRoKrL EhMCAdvzNH3vf0w7MYPIW0CPItRlzTNdQDo9lpjPi9gHPMu/sJzz7GmmT/hiCrxYZ+pp IVaht2oMOrt4NJ175wcxSZhlQyoxSq4BVMVGxBSSqeoEwOO1MsNxlSdkrzR+fPFuAKn3 LK8f9ASJFPGI4Q7by+ZWsfi7+RV7+uUvEbI/+yMYoA1i7MePSRFL9EPOmQ8w/onTHJjv aC7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 p14-v6si465775pgv.255.2018.06.12.03.45.43; Tue, 12 Jun 2018 03:45:58 -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; 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 S933318AbeFLKnf (ORCPT + 99 others); Tue, 12 Jun 2018 06:43:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:38246 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933252AbeFLKnc (ORCPT ); Tue, 12 Jun 2018 06:43:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CE84AAC42; Tue, 12 Jun 2018 10:43:30 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 7973CDA9C7; Tue, 12 Jun 2018 12:40:41 +0200 (CEST) Date: Tue, 12 Jun 2018 12:40:41 +0200 From: David Sterba To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , Jan Kara , Jeff Layton , Lukas Czerner , Ross Zwisler , Christoph Hellwig , Goldwyn Rodrigues , Nicholas Piggin , Ryusuke Konishi , linux-nilfs@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH v13 00/72] Convert page cache to XArray Message-ID: <20180612104041.GB24375@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Matthew Wilcox , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , Jan Kara , Jeff Layton , Lukas Czerner , Ross Zwisler , Christoph Hellwig , Goldwyn Rodrigues , Nicholas Piggin , Ryusuke Konishi , linux-nilfs@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net References: <20180611140639.17215-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180611140639.17215-1-willy@infradead.org> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 11, 2018 at 07:05:27AM -0700, Matthew Wilcox wrote: > From: Matthew Wilcox > > The XArray is a replacement for the radix tree. For the moment it uses > the same data structures, enabling a gradual replacement. This patch > set implements the XArray and converts the page cache to use it. > > A version of these patches has been running under xfstests for over 48 > hours, so I have some confidence in them. The DAX changes are untested. > This is based on next-20180608 and is available as a git tree at > git://git.infradead.org/users/willy/linux-dax.git xarray-20180608 I've hit a crash, triggered by fstests/btrfs/141 and with ext4 on the stack. The test itself does not use ext4, so it must be the root partition of the VM (qemu 2G ram, 4 cpus). Other tests up to that point were ok. [ 9875.174796] kernel BUG at fs/inode.c:513! [ 9875.176519] invalid opcode: 0000 [#1] PREEMPT SMP [ 9875.177532] CPU: 3 PID: 30077 Comm: 141 Not tainted 4.17.0-next-20180608-default+ #1 [ 9875.179235] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 [ 9875.181152] RIP: 0010:clear_inode+0x7a/0x90 [ 9875.185414] RSP: 0018:ffffae6b49893c40 EFLAGS: 00010086 [ 9875.186381] RAX: 0000000000000000 RBX: ffff8f427d3024a0 RCX: 0000000000000000 [ 9875.187629] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8f427d302608 [ 9875.188838] RBP: ffff8f427d302608 R08: 0000000000000000 R09: ffffffffffffffff [ 9875.190061] R10: ffffae6b49893a28 R11: ffffffffffffffff R12: ffffffff83a338c0 [ 9875.191348] R13: ffff8f427bfd9000 R14: 000000000000011f R15: 0000000000000000 [ 9875.192750] FS: 00007fde1859ab80(0000) GS:ffff8f427fd80000(0000) knlGS:0000000000000000 [ 9875.194370] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9875.195504] CR2: 000055c95307e1a0 CR3: 000000007be57000 CR4: 00000000000006e0 [ 9875.196957] Call Trace: [ 9875.197593] ext4_clear_inode+0x16/0x80 [ 9875.198519] ext4_evict_inode+0x44/0x510 [ 9875.199458] evict+0xcd/0x190 [ 9875.200205] dispose_list+0x48/0x60 [ 9875.201050] prune_icache_sb+0x42/0x50 [ 9875.201943] super_cache_scan+0x124/0x1a0 [ 9875.202896] shrink_slab+0x1c9/0x3d0 [ 9875.203760] drop_slab_node+0x22/0x50 [ 9875.204636] drop_caches_sysctl_handler+0x47/0xb0 [ 9875.205707] proc_sys_call_handler+0xb5/0xd0 [ 9875.206671] __vfs_write+0x23/0x150 [ 9875.207322] ? set_close_on_exec+0x30/0x70 [ 9875.208062] vfs_write+0xad/0x1e0 [ 9875.208762] ksys_write+0x42/0x90 [ 9875.209487] do_syscall_64+0x4f/0xe0 [ 9875.210272] entry_SYSCALL_64_after_hwframe+0x44/0xa9 504 void clear_inode(struct inode *inode) 505 { 506 /* 507 * We have to cycle the i_pages lock here because reclaim can be in the 508 * process of removing the last page (in __delete_from_page_cache()) 509 * and we must not free the mapping under it. 510 */ 511 xa_lock_irq(&inode->i_data.i_pages); 512 BUG_ON(inode->i_data.nrpages); 513 BUG_ON(inode->i_data.nrexceptional); 'exceptional' is from the page cache realm so I think it's not an ext4 bug.