Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1389659ybg; Wed, 29 Jul 2020 12:55:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKMRp5DGe/cQKFYriFMz3F1t5FxDfKv3lodmJVEd5bKCgYwG6Hq3bt3j0ouO8FhFCc4lMN X-Received: by 2002:a17:906:288d:: with SMTP id o13mr3122ejd.199.1596052556502; Wed, 29 Jul 2020 12:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596052556; cv=none; d=google.com; s=arc-20160816; b=0LAjaLpoyE90nnSHfVertzPkZp350NEiu6bMFzSerFvwXcbr6tr9CR640AfTfSABaq Umsc3M4Sdm+oomzdXy4oFZ/kmdHPeWx/6p0hVKUas+RN1b/LC5TjtMcMu5zzi9bsTbSz qy9yk00H2GyFIMEqg/qhh5zWkeOCiJBoPTMxpvEOEX5vo3IiDBD8nF4u0C8VNHqvVVpi z1a41e/3Wvb+I+LpJa7kgMgAZSuggLErbqi65sRJCwCoLr04vRQU6DbCVAL92aZMNQN3 0iKEVJhdn9u9SrrSefCfKkEVQtlyhUSxspPivfgHAZIae/NoZFfLqLIylGu4UEIfx055 BOMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GGS573IhCZS2mOBQQ1tjPGeTS9xau0FB27cV2ohvdvQ=; b=uXXWlhquKdJcIyLSRCTO9MZMbSTqQpCelg5/gXXLoZtJj5xEHJGQtRwDwxnwc576b/ hbRo3g8q9sOfy5vQKP7ElOQ/259W8JtzX8FluM5+ivTuMB72WQlMA4ru1iRpBypaoyfm Ob6Ye++tuBcRNGVJKFGAbXF2z60im3g2v06V6YRH4VunpOeYOsj7WDAbhWkl5bE+qAGh i8qhBajLGJ5gPZoQ4Kwg+xDQKGj4gmUtoG/03EeF8Jk+iguYRlLtqRSg4/cKw4N8yc6i 8MvKaQJqnjTiT8075X1TnfXGW1pP2RYv6o4PE3ymKmU3zlRIyBgp4QvnMe5C/P1sOkrE 2hZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=mhxY2fy8; 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 bc2si1958409edb.424.2020.07.29.12.55.32; Wed, 29 Jul 2020 12:55:56 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=mhxY2fy8; 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 S1726628AbgG2Typ (ORCPT + 99 others); Wed, 29 Jul 2020 15:54:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbgG2Typ (ORCPT ); Wed, 29 Jul 2020 15:54:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1664C061794 for ; Wed, 29 Jul 2020 12:54:44 -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=GGS573IhCZS2mOBQQ1tjPGeTS9xau0FB27cV2ohvdvQ=; b=mhxY2fy8WfWqpCc53TmJurRGOq FY53GgRdECDEss0yx1Fqcw3gb8ys3LHbAVecHiiyN/yj3sv5nXSJzyDHPudqc/Hx+g/Dky+7N5Q7g v/dBw46bA88egYez7lQAziFu+gRAUBwCwlTq7B6GT+bW10gCUlXnHbgRagMuouJe+3fbiIzhg0+m+ rXxxw0VGFqUvabNPgmbl+XZZiOzkrVefT4xDXXJrxOA/nNpSgzo1GpzNlrHNsM7K4dG1SQsKkHnBc m3LBPnYAE9ZBrBy1R4CQ5PVv3UDsJoSr3StSf5Stm225boH5Djj4cviOvAVo1khsASgZ0dP+6lc1l L2bIO+Eg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0s9o-0001md-Ap; Wed, 29 Jul 2020 19:54:32 +0000 Date: Wed, 29 Jul 2020 20:54:32 +0100 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Hillf Danton , "Kirill A. Shutemov" , Andrew Morton , syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Mike Kravetz , Johannes Weiner , Jens Axboe , Markus Elfring Subject: Re: kernel BUG at include/linux/swapops.h:LINE! Message-ID: <20200729195432.GY23808@casper.infradead.org> References: <000000000000bc4fd705a6e090e2@google.com> <0000000000004c38cd05aad1d13f@google.com> <20200720165144.93189f7825bd28e234a42cb8@linux-foundation.org> <20200723073744.5268-1-hdanton@sina.com> <20200724111311.rcjqigtjqpkenxg6@box> <20200726164904.GG23808@casper.infradead.org> <20200727103140.xycdx6ctecomqsoe@box> <20200727120310.GJ23808@casper.infradead.org> <20200729192151.eyghcfysfzaf2ijg@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200729192151.eyghcfysfzaf2ijg@box> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 29, 2020 at 10:21:51PM +0300, Kirill A. Shutemov wrote: > On Mon, Jul 27, 2020 at 01:03:10PM +0100, Matthew Wilcox wrote: > > > It would be interesting to know if the migration entires ever got removed > > > for pfn. I mean if remove_migration_pte() got called for it. > > > > > > It can be rmap issue too. Maybe it misses PMD on remove_migration_ptes() > > > or something. > > > > It's not mapped with a PMD. I tweaked my debugging slightly: > > > > static inline swp_entry_t make_migration_entry(struct page *page, int write) > > { > > - BUG_ON(!PageLocked(compound_head(page))); > > + VM_BUG_ON_PAGE(!PageLocked(page), page); > > > > +if (PageHead(page)) dump_page(page, "make entry"); > > +if (PageTail(page)) printk("pfn %lx order %d\n", page_to_pfn(page), thp_order(thp_head(page))); > > > > 1523 page:0000000006f62206 refcount:490 mapcount:1 mapping:0000000000000000 index:0x562b12a00 pfn:0x1dc00 > > 1523 head:0000000006f62206 order:9 compound_mapcount:0 compound_pincount:0 > > 1523 anon flags: 0x400000000009003d(locked|uptodate|dirty|lru|active|head|swapbacked) > > 1523 raw: 400000000009003d ffffecfd41301308 ffffecfd41b08008 ffff9e9971c00059 > > 1523 raw: 0000000562b12a00 0000000000000000 000001ea00000000 0000000000000000 > > 1523 page dumped because: make entry > > 1523 pfn 1dc01 order 9 > > 1523 pfn 1dc02 order 9 > > 1523 pfn 1dc03 order 9 > > ... > > > > Notice that it's an anonymous page, so it's not related to my work. > > I don't have much hope, but could you try if the patch below would blow > up? Running it now. Results probably in twenty minutes. > Could you share the setup you use to trigger the issue? I want try it > myself. Head commit d8b18bdf9870b131802d641f5e7f32ddc53dcce3 which you can find in http://git.infradead.org/users/willy/pagecache.git I'm using Kent Overstreet's ktest as the base: https://github.com/koverstreet/ktest from the root of the kernel tree, I type: $ ../ktest/build-test-kernel run ../ktest/tests/xfs.ktest xfs.ktest is not in Kent's repo: #!/bin/bash require-kernel-config XFS_FS require-kernel-config XFS_QUOTA XFS_POSIX_ACL XFS_RT XFS_ONLINE_SCRUB require-kernel-config XFS_ONLINE_REPAIR XFS_DEBUG XFS_ASSERT_FATAL require-kernel-config QUOTA require-lib xfstests.sh run_tests() { run_xfstests xfs "$@" } I think that's all you'll need to get going.