Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp850807pxu; Thu, 3 Dec 2020 14:24:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJznoBHUNKA42AGiEq06lFb/eiza6xzyyCfSVgV3kqid0mlNu3idlSIwB90BZQRHrdfHu0tm X-Received: by 2002:a17:906:af83:: with SMTP id mj3mr4358649ejb.243.1607034289163; Thu, 03 Dec 2020 14:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607034289; cv=none; d=google.com; s=arc-20160816; b=kb8rGceO9FDMNWDhRQ8FJfJCfVtmiiMgGiD5DYmo+Nsh+9loeQSoI6JsJ1ojqX7oTS mdUXdHoBfafMYfS3+xB76xnGD8jUI+QI0CLv+YpIE9n9VosgdSfXYgvOvQdnNX1ldbzP EjnltmkoTZMARpnY7Gn6XugUa+eE4eX3UGjbpkaVwzjRntofFLjxkocVnimgl13LmNBP ZgXjL6xUh8+XRSMVcv3vmrrbQrl7kNbcOLeJi6YQjgaCWKheuIhgj1nUMjJI/H5K6PcT mho0dhWw+XwimR/vo2pIBYW2obx3mZpWEW22KLY8FsAeeluzjCShpAbY90GbzCuSoUpV Jd1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=QIvdaXMerZjHKN16VIAknaqTSxjYn/RYpNcQZGlB0eM=; b=r8XkFROnX20A8kESwVLC2wt7lm21plzDD3S2Q89V1mqB3SEnRGAJbsdkUWskxsZF9w ERVjbnkV3AQ95FhH7wULwhChgUu7eanEkwo1oU4/rOc5ZTx1N4pqVHUPKZ2VJdbftd6x kE0JbXs6X+8Zz/v0ui40o4rJKy5DxFTfl7q9b3PW7NdrOks38VHeNdqERyhv+caYiVL4 uF9Fu0/ZdRfNnf2hAVSlAxP4QnTsqgGUjKlnvz8ymF/0C2fW/vSr3Vf50cQA1ww24bVB Ze+/8rCN5FPvqF7KV5vc2eMvqGKG4/i+OfLftFwyxWXOm3SYP7Y2m87b8d+f0gY3ESzc g12g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lqkpuDgP; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f5si1708262edw.349.2020.12.03.14.24.24; Thu, 03 Dec 2020 14:24:49 -0800 (PST) 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=@google.com header.s=20161025 header.b=lqkpuDgP; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726187AbgLCWUM (ORCPT + 99 others); Thu, 3 Dec 2020 17:20:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbgLCWUM (ORCPT ); Thu, 3 Dec 2020 17:20:12 -0500 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 346CEC061A4F for ; Thu, 3 Dec 2020 14:19:32 -0800 (PST) Received: by mail-ot1-x344.google.com with SMTP id t18so3367794otk.2 for ; Thu, 03 Dec 2020 14:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=QIvdaXMerZjHKN16VIAknaqTSxjYn/RYpNcQZGlB0eM=; b=lqkpuDgPEmdoc2666gMa9RbwXHp9urjMEjXlMv/r516+5uWHSkWLdJrQOrUi/dLCY3 WytTyd9zO8543c5RUqrF+D8FAOdOzmhAQ33L5+OoDxlyUo6yuB5mTN9lanUW3vU6iW80 br/N7YjPVtGNfTQNwk2ShkWO92y58G2ZqZhW+0CRLpvLUBTTJ1T5HF9D++K+jB3LqgdV UUxOpE8g5qPxY78om6kXySy4HykQQnj5C92TrhqtBQk1oNm/Ag3KKIkR9o+MiScHAjkj rTMsxB+p9+/T/x+UEfLjSDy9LH0vDXXfxLTsL1XSYMQPf6k/SC9wpTEW4qzrVLiC6poB tkBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=QIvdaXMerZjHKN16VIAknaqTSxjYn/RYpNcQZGlB0eM=; b=G0vYW/rNKk77LLhpKHNt1imj+lHxwwCSFgcBVZmYG+qaOOmdkLj5BZ0j+WfA3796Rg Irkmy5qKWov8Ma7/UJ3K7I5Wgd+r56lcqgwAfazp6QINaS03GLKCucVpxRQkYPKyyMlm JBEX0qUZC2J1Ru4xBJC6waMBdS5Cl/yrjOZVNPdtGEITO9e09TuXJu+BIm5AD8io8KT6 cZzapzGWM5cUPlvO/T4CAtYTHRnGKqCrlS+2maQ2Q819mdvkWRaX8fVJO1iGRQVjVQQJ LeSP+E8H9NixsdSfw81MGJBFD9Og8BsMjmwBmTxfWc/g7OUNFLuxhSfc1n2oqIxm3C6y tkCA== X-Gm-Message-State: AOAM531Qgk4LocuyI/SYtmRG7PmcvV++gBWefHDCVAAPG7hocBQBQFCo nGVyocTwekvjzk0sCe4i/Fb/wg== X-Received: by 2002:a9d:6312:: with SMTP id q18mr1194866otk.264.1607033971283; Thu, 03 Dec 2020 14:19:31 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id t21sm172229otr.77.2020.12.03.14.19.29 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Thu, 03 Dec 2020 14:19:30 -0800 (PST) Date: Thu, 3 Dec 2020 14:19:19 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Qian Cai cc: Marek Szyprowski , Matthew Wilcox , Hugh Dickins , Andrew Morton , Jan Kara , William Kucharski , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, hch@lst.de, hannes@cmpxchg.org, yang.shi@linux.alibaba.com, dchinner@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 00/16] Overhaul multi-page lookups for THP In-Reply-To: Message-ID: References: <20201112212641.27837-1-willy@infradead.org> <20201117153947.GL29991@casper.infradead.org> <20201117191513.GV29991@casper.infradead.org> <20201117234302.GC29991@casper.infradead.org> <20201125023234.GH4327@casper.infradead.org> <0107bae8-baaa-9d39-5349-8174cb8abbbe@samsung.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Dec 2020, Qian Cai wrote: > On Thu, 2020-12-03 at 18:27 +0100, Marek Szyprowski wrote: > > On 03.12.2020 16:46, Marek Szyprowski wrote: > > > On 25.11.2020 03:32, Matthew Wilcox wrote: > > > > On Tue, Nov 17, 2020 at 11:43:02PM +0000, Matthew Wilcox wrote: > > > > > On Tue, Nov 17, 2020 at 07:15:13PM +0000, Matthew Wilcox wrote: > > > > > > I find both of these functions exceptionally confusing. Does this > > > > > > make it easier to understand? > > > > > Never mind, this is buggy. I'll send something better tomorrow. > > > > That took a week, not a day. *sigh*. At least this is shorter. > > > > > > > > commit 1a02863ce04fd325922d6c3db6d01e18d55f966b > > > > Author: Matthew Wilcox (Oracle) > > > > Date: Tue Nov 17 10:45:18 2020 -0500 > > > > > > > > fix mm-truncateshmem-handle-truncates-that-split-thps.patch > > > > > > This patch landed in todays linux-next (20201203) as commit > > > 8678b27f4b8b ("8678b27f4b8bfc130a13eb9e9f27171bcd8c0b3b"). Sadly it > > > breaks booting of ANY of my ARM 32bit test systems, which use initrd. > > > ARM64bit based systems boot fine. Here is example of the crash: > > > > One more thing. Reverting those two: > > > > 1b1aa968b0b6 mm-truncateshmem-handle-truncates-that-split-thps-fix-fix > > > > 8678b27f4b8b mm-truncateshmem-handle-truncates-that-split-thps-fix > > > > on top of linux next-20201203 fixes the boot issues. > > We have to revert those two patches as well to fix this one process keeps > running 100% CPU in find_get_entries() and all other threads are blocking on the > i_mutex almost forever. > > [ 380.735099] INFO: task trinity-c58:2143 can't die for more than 125 seconds. > [ 380.742923] task:trinity-c58 state:R running task stack:26056 pid: 2143 ppid: 1914 flags:0x00004006 > [ 380.753640] Call Trace: > [ 380.756811] ? find_get_entries+0x339/0x790 > find_get_entry at mm/filemap.c:1848 > (inlined by) find_get_entries at mm/filemap.c:1904 > [ 380.761723] ? __lock_page_or_retry+0x3f0/0x3f0 > [ 380.767009] ? shmem_undo_range+0x3bf/0xb60 > [ 380.771944] ? unmap_mapping_pages+0x96/0x230 > [ 380.777036] ? find_held_lock+0x33/0x1c0 > [ 380.781688] ? shmem_write_begin+0x1b0/0x1b0 > [ 380.786703] ? unmap_mapping_pages+0xc2/0x230 > [ 380.791796] ? down_write+0xe0/0x150 > [ 380.796114] ? do_wp_page+0xc60/0xc60 > [ 380.800507] ? shmem_truncate_range+0x14/0x80 > [ 380.805618] ? shmem_setattr+0x827/0xc70 > [ 380.810274] ? notify_change+0x6cf/0xc30 > [ 380.814941] ? do_truncate+0xe2/0x180 > [ 380.819335] ? do_truncate+0xe2/0x180 > [ 380.823741] ? do_sys_openat2+0x5c0/0x5c0 > [ 380.828484] ? do_sys_ftruncate+0x2e2/0x4e0 > [ 380.833417] ? trace_hardirqs_on+0x1c/0x150 > [ 380.838335] ? do_syscall_64+0x33/0x40 > [ 380.842828] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 Thanks for trinitizing. If you have time, please would you try replacing the shmem_undo_range() in mm/shmem.c by the version I gave in https://lore.kernel.org/linux-mm/alpine.LSU.2.11.2012031305070.12944@eggly.anvils/T/#mc15d60a2166f80fe284a18d4758eb4c04cc3255d That will not help at all with the 32-bit booting issue, but it does have a good chance of placating trinity. Thanks, Hugh