Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4364163ybl; Mon, 13 Jan 2020 12:22:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxIpVKJVs9Xi2tzVDbRZoPO6SmBvLtL1UQkyQdpR6w+s3FjMYmhaYo4Toy+Z1Z4H7/4MZx4 X-Received: by 2002:aca:39d6:: with SMTP id g205mr13113575oia.122.1578946936421; Mon, 13 Jan 2020 12:22:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578946936; cv=none; d=google.com; s=arc-20160816; b=tEl63m+chPcrQVdZy8jmH9qZ8f2NzsXdWEaru1kKkQuzOSSdAbD4kttJvR18PWQu4h rLeWqhVMW7afPfOGmtFs09T9Il75nTanwztHBglvIisWP4Qy7XVRzbpQ8yReZyddy3K0 2ROoZUpa0/8N+M28otL0XaLV40PlScD+Gqd28OwBD31S46iUnRDE9UTVa7XN5CAtpRNT S0am3GtMPkKPoud6x9aMbJvGfF+SUb1ZxBKe3p55jzsrtML2Y2WqdcnCYffFcoheBcRk YxioBsu5IE3flqcF4nnTidt++gLF7IeF+7yUDRUMP/VBYyZwTuMVKWsVSmeMSAlwouPW akcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=bIaxZyK0QJpQTL/WgrEd8VP6JHOxc9uUiVT69OkfGfs=; b=FReAz9uefj6CJM6D7TkfexAR+FAmywzPkaNA2I+4PqgzenK4bXvSAOn7rftgiK8+Ry 3/Jp1xa5xm6C0YNdv8w2NDJFGwdZNVUw8VQA5ehq3nV5sQH+XTYnD0tJQuu8KA7rfTBN +a8t+RLVqdnRbqeYYs4XS/Um3qxub1JKNY+/XaSsaQvC8PlqjK8UVnoq5F+qV+upLSzg gJOux8gOse/Vds7DoZWeiaXbH3EEslqIp3tEIHFXJRfOF7MgSTSwN9mqpogs0OFZ/Rqf jVjn96g28XQzBLdOOAi1llSfh2DE6jJcMqtzWQqRSRDmOB+b+7ecrQxe8aDwfoyd3B9J op+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Cho5Xgy5; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s129si6207929oig.177.2020.01.13.12.22.04; Mon, 13 Jan 2020 12:22:16 -0800 (PST) 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=pass header.i=@google.com header.s=20161025 header.b=Cho5Xgy5; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727137AbgAMUVI (ORCPT + 99 others); Mon, 13 Jan 2020 15:21:08 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:38401 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbgAMUVH (ORCPT ); Mon, 13 Jan 2020 15:21:07 -0500 Received: by mail-pl1-f194.google.com with SMTP id f20so4257240plj.5 for ; Mon, 13 Jan 2020 12:21:07 -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=bIaxZyK0QJpQTL/WgrEd8VP6JHOxc9uUiVT69OkfGfs=; b=Cho5Xgy5zKREtQuKz+/bSZ0g+gIyHdz2p24Yfmsxr7CAccjr5kcYpqbgOvKvI1tvOi 0Pw3+2nxm7aPkD+pmpl/OIX7moakvPw2GOjM30vb5vz5mSO0dN7irc5zX92k8ZNLh5FZ C+9K7yYtuDy4lOut09g3xyF2lbu0OFZDC34OWJr2lBCTa1hJaiygNIy2lV4Jj8HzXOkA lE1ma7JDpwMYDBQyQSniSv3xsKGxjIIbQCruULLZa0ItRSSKET5yRX8Vl3N174N8zYr1 Ixn4VH4adsnqXjKH5qgXYxbPbyK5p0X3/nAOowu2RukAy8WC22V/2K4DHpY87DfNUPGr zJDw== 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=bIaxZyK0QJpQTL/WgrEd8VP6JHOxc9uUiVT69OkfGfs=; b=ht0KkTodMxeoUsuAEZiOQDHG9N8VoCR3bCn9q7NtAiti3iYhIA/zV3BkhTPgodkl1k H5ZETLMbo1D0ybKXexIFslAirmLW6QIiXzcS27c16WQZ89TvsN6cyVWy1CCkfxPHbFoA UdS72U+nbMQ4wSTngFRbcqBlG0Z56XkjC79qfm+W1JSymKVvzDmP29Bl/wURZQM6Exz5 5+C9qySqQFo0tine+UlMdRObFgBcRMw8PxkCn0Dd7qdztpytxXXK7EB9OwLlN9ubgN3y H7EDOSFf7Tr0rjWm134Lmt1ZzuQx4K0Nrj8PSmMlYQdoE1vvsVs24ZhRDLu1pfjU6Sp5 Dmaw== X-Gm-Message-State: APjAAAWPjRiEDmqD2PMyC5jipiXLAx7zDuTzP1UH7BokHT4RC12FwdCq w1EmflxJ0IbHwW+TCK6sg8dScA== X-Received: by 2002:a17:90a:7345:: with SMTP id j5mr23348884pjs.69.1578946866353; Mon, 13 Jan 2020 12:21:06 -0800 (PST) Received: from [100.112.92.218] ([104.133.9.106]) by smtp.gmail.com with ESMTPSA id c17sm14862042pfi.104.2020.01.13.12.21.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Jan 2020 12:21:05 -0800 (PST) Date: Mon, 13 Jan 2020 12:20:48 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Alex Shi cc: Hugh Dickins , hannes@cmpxchg.org, Andrew Morton , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mgorman@techsingularity.net, tj@kernel.org, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, yang.shi@linux.alibaba.com, willy@infradead.org, shakeelb@google.com Subject: Re: [PATCH v7 00/10] per lruvec lru_lock for memcg In-Reply-To: <24d671ac-36ef-8883-ad94-1bd497d46783@linux.alibaba.com> Message-ID: References: <1577264666-246071-1-git-send-email-alex.shi@linux.alibaba.com> <20191231150514.61c2b8c8354320f09b09f377@linux-foundation.org> <944f0f6a-466a-7ce3-524c-f6db86fd0891@linux.alibaba.com> <24d671ac-36ef-8883-ad94-1bd497d46783@linux.alibaba.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1359013247-1578946865=:1084" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1359013247-1578946865=:1084 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 13 Jan 2020, Alex Shi wrote: > =E5=9C=A8 2020/1/13 =E4=B8=8B=E5=8D=884:48, Hugh Dickins =E5=86=99=E9=81= =93: > >=20 > > I (Hugh) tried to test it on v5.5-rc5, but did not get very far at all = - > > perhaps because my particular interest tends towards tmpfs and swap, > > and swap always made trouble for lruvec lock - one of the reasons why > > our patches were more complicated than you thought necessary. > >=20 > > Booted a smallish kernel in mem=3D700M with 1.5G of swap, with intentio= n > > of running small kernel builds in tmpfs and in ext4-on-loop-on-tmpfs > > (losetup was the last command started but I doubt it played much part): > >=20 > > mount -t tmpfs -o size=3D470M tmpfs /tst > > cp /dev/zero /tst > > losetup /dev/loop0 /tst/zero >=20 > Hi Hugh, >=20 > Many thanks for the testing! >=20 > I am trying to reproduce your testing, do above 3 steps, then build kerne= l with 'make -j 8' on my qemu. but cannot reproduce the problem with this v= 7 version or with v8 version, https://github.com/alexshi/linux/tree/lru-nex= t, which fixed the bug KK mentioned, like the following.=20 > my qemu vmm like this: >=20 > [root@debug010000002015 ~]# mount -t tmpfs -o size=3D470M tmpfs /tst > [root@debug010000002015 ~]# cp /dev/zero /tst > cp: error writing =E2=80=98/tst/zero=E2=80=99: No space left on device > cp: failed to extend =E2=80=98/tst/zero=E2=80=99: No space left on device > [root@debug010000002015 ~]# losetup /dev/loop0 /tst/zero > [root@debug010000002015 ~]# cat /proc/cmdline > earlyprintk=3DttyS0 root=3D/dev/sda1 console=3DttyS0 debug crashkernel=3D= 128M printk.devkmsg=3Don >=20 > my kernel configed with MEMCG/MEMCG_SWAP with xfs rootimage, and compilin= g kernel under ext4. Could you like to share your kernel config and detaile= d reproduce steps with me? And would you like to try my new version from ab= ove github link in your convenient? I tried with the mods you had appended, from [PATCH v7 02/10] discussion with Konstantion: no, still crashes in a similar way. Does your github tree have other changes too? I see it says "Latest commit e05d0dd 22 days ago", which doesn't seem to fit. Afraid I don't have time to test many variations. It looks like, in my case, systemd was usually jumping in and doing something with shmem (perhaps via memfd) that read back from swap and triggered the crash without any further intervention from me. So please try booting with mem=3D700M and 1.5G swap, mount -t tmpfs -o size=3D470M tmpfs /tst cp /dev/zero /tst; cp /tst/zero /dev/null That's enough to crash it for me, without getting into any losetup or systemd complications. But you might have to adjust the numbers to be sure of writing out and reading back from swap. It's swap to SSD in my case, don't think that matters. I happen to run with swappiness 100 (precisely to help generate swap problems), but swappiness 60 is good enough to get these crashes. Hugh --0-1359013247-1578946865=:1084--