From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6BA0C43334 for ; Wed, 8 Jun 2022 08:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbiFHIXB (ORCPT ); Wed, 8 Jun 2022 04:23:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230430AbiFHIVk (ORCPT ); Wed, 8 Jun 2022 04:21:40 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2261C3AE80D; Wed, 8 Jun 2022 00:48:30 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id kq6so26719595ejb.11; Wed, 08 Jun 2022 00:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kXkJZDN5f41vCkZwW8ZE7hb5zQfmu2jYPyBC+wVy0V8=; b=eNf6oOTDd4otQkXVR6HRhBsozVbIZwZyj++kC1qQELl8tphSLEM/Hu7EmLxoB3GLLo mKqHWgCo7DltiHf+Z0vuFYCL3ghZSenJBKEylJBKWkgx2ZZ//nPKQUEtVIFDBJnwsK1u 14uL/3oKR+8p+woV2hkpDEFVK7PrNRfZNr7YXGN0GJTFMxksR2wV/9vlyQ+Ec7zTivEN q0s3MfmTZy6AC9GeJtv6VZfz8wmBxvsHmXZmYzWKXVyWdbhuaKpHghNzNV8f8YiQhGrU pZ2k6A5QDSe+DeMhczhQAGKEqlntx/szER82q86xUWbNSbpJLGXHG5LyxviMC0DflYu/ 2ZDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kXkJZDN5f41vCkZwW8ZE7hb5zQfmu2jYPyBC+wVy0V8=; b=PoFTrtMQw56ILqDotyYIc8djACfQ7gjhRsFHAe6943ewmWy/KxQlJ5+vpfvL/hpTFm gHdLO2mkh9i7VVz8hhO9FbM2mTOE47tWvPUArB3bQazA0Gcxs04CYg7fJZ1yY68JbdEi MleaVyzK59X0YphWxe/XTe49yyS8oXiCfx4caRBUzXMjQQfIFMYG+U9+StgEj253Aamt vsq+7F+90tjFYNUO5WXz08RmX8+Af0HVt0hSeQSKcNPvKJ3mdO9LI5ZI6YH/eAYr3/Jc aBzGQrjGh9OZ3/yLu5dLV1tY3awcuJA6zIfwCxAsWyAgMX0BZMvTg3xmSnYWPlXfmIan GHvw== X-Gm-Message-State: AOAM531CeE9Wo2qSFasqSlV+astsgGn7rpouDEV78kIPBtbGn23BSFvM /u7JY6LHOhfrtLZIQnM+uOiWfKzqvBAzyTYdgTY= X-Google-Smtp-Source: ABdhPJxSeTe7VJehA0LRTPFttB6Zx5E5UjOZxX/dzRtWP2rBcx1ZeTzlRRrljEuS9xzqsTj0W3eVnJ09RbifGzFqMlI= X-Received: by 2002:a17:907:a0c8:b0:711:d82a:1caa with SMTP id hw8-20020a170907a0c800b00711d82a1caamr10971990ejc.702.1654674508479; Wed, 08 Jun 2022 00:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20220518014632.922072-1-yuzhao@google.com> <20220518014632.922072-8-yuzhao@google.com> In-Reply-To: From: Barry Song <21cnbao@gmail.com> Date: Wed, 8 Jun 2022 19:48:17 +1200 Message-ID: Subject: Re: [PATCH v11 07/14] mm: multi-gen LRU: exploit locality in rmap To: Yu Zhao Cc: Will Deacon , Andrew Morton , Linux-MM , Andi Kleen , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Johannes Weiner , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Peter Zijlstra , Tejun Heo , Vlastimil Babka , LAK , Linux Doc Mailing List , LKML , x86 , Kernel Page Reclaim v2 , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain , huzhanyuan@oppo.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 8, 2022 at 7:07 AM Yu Zhao wrote: > > On Tue, Jun 7, 2022 at 1:37 AM Barry Song <21cnbao@gmail.com> wrote: > > > > On Mon, Jun 6, 2022 at 9:25 PM Barry Song <21cnbao@gmail.com> wrote: > > > > > > On Wed, May 18, 2022 at 4:49 PM Yu Zhao wrote: > > ... > > > I can't really explain why we are getting a random app/java vm crash in monkey > > test by using ptep_test_and_clear_young() only in lru_gen_look_around() on an > > armv8-a machine without hardware PTE young support. > > > > Moving to ptep_clear_flush_young() in look_around can make the random > > hang disappear according to zhanyuan(Cc-ed). > > This sounds too familiar -- let me ask again: was the following commit > included during the test? > > 07509e10dcc7 arm64: pgtable: Fix pte_accessible() > > If not, it will cause exactly the problem you described. And what > about this one? > > e914d8f00391 mm: fix unexpected zeroed page mapping with zram swap > > Missing it also causes userspace memory corruption on Android, i.e., > random app crashes. > According to zhanyuan's testing, we can confirm the above two commits can fix the random android crash. Thanks Barry From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A03ABC43334 for ; Wed, 8 Jun 2022 07:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zGKh6x9ZQa6PxaIl7ajY82vogkZVdwCD4skckZPfTTQ=; b=0yZd/Yqwou0mPW 9TF9t2g4TOe633W7uT2UVXqsd8w4LdTs6fkoSjvUrupp/LOtzzAEKrZuzlYXdfYB7oQ0Eez9Az+c9 b7QE8M8Bfm/qk4+RWXow3Tb69QxvH4unefwlhXEJe5vkk3Wo0/a1cAkIa5b2ZK5fQw4TIpsriSVK1 v1PETld67UqVOKxfkmD+FdvAp/FhaotKjd+xxm3g+kj8xVFZXzXTjZKpPCvYulDL4mKsCFI3oi5QP lGaEV3Z+YCaiNBSlBTFNUiPmhBIml1F8Cqe9DImJ/GWq/+dZhk+ly+c/W1R9GFin5Lf0sTcfsLtuC oJmRCcQc+HFHZE29RiuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyqQb-00Bk2t-RF; Wed, 08 Jun 2022 07:48:33 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyqQY-00Bk1D-Ff for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 07:48:31 +0000 Received: by mail-ej1-x636.google.com with SMTP id n10so39790068ejk.5 for ; Wed, 08 Jun 2022 00:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kXkJZDN5f41vCkZwW8ZE7hb5zQfmu2jYPyBC+wVy0V8=; b=eNf6oOTDd4otQkXVR6HRhBsozVbIZwZyj++kC1qQELl8tphSLEM/Hu7EmLxoB3GLLo mKqHWgCo7DltiHf+Z0vuFYCL3ghZSenJBKEylJBKWkgx2ZZ//nPKQUEtVIFDBJnwsK1u 14uL/3oKR+8p+woV2hkpDEFVK7PrNRfZNr7YXGN0GJTFMxksR2wV/9vlyQ+Ec7zTivEN q0s3MfmTZy6AC9GeJtv6VZfz8wmBxvsHmXZmYzWKXVyWdbhuaKpHghNzNV8f8YiQhGrU pZ2k6A5QDSe+DeMhczhQAGKEqlntx/szER82q86xUWbNSbpJLGXHG5LyxviMC0DflYu/ 2ZDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kXkJZDN5f41vCkZwW8ZE7hb5zQfmu2jYPyBC+wVy0V8=; b=ZY9i4BYbeiZkk4q1/u/TfD+pKd88lDO+psaBXY5QhMkrrd/q7Pkpm4fyNHRIWvtDoH AhgbvGkByvHuJcibu3UWNzD/8he8am5rizRNxXPEPhY9prtaN3Ar0UYBhhtf0hMo4I/4 vBc4PHlzDMXHU+j9mETzhRBmaclEcYz5Co9Pwi/pYdkecxoYcpFI7+S3zU/vge3RTD4/ NLWsLhjrK0RDqf/u4cLfu+hB4Chpj1TUVrxiYNdbNtlcuTCxLfXBUadorne53RDDKGoe 6R4kNAf+RglQrPqPk4fpCY0hl8TRYnJBlUjuScKUllDgJbRW3/iUeJD/6pPDjPD+/4h6 qslw== X-Gm-Message-State: AOAM5339reYKupUjuJYtR621keJOEG0sQBhTKqQIyEfHHTvoauZ7mZzf +DSXO8ERWHR3MI4uETKmbZ1y2kPxhWTnxvJPzsg= X-Google-Smtp-Source: ABdhPJxSeTe7VJehA0LRTPFttB6Zx5E5UjOZxX/dzRtWP2rBcx1ZeTzlRRrljEuS9xzqsTj0W3eVnJ09RbifGzFqMlI= X-Received: by 2002:a17:907:a0c8:b0:711:d82a:1caa with SMTP id hw8-20020a170907a0c800b00711d82a1caamr10971990ejc.702.1654674508479; Wed, 08 Jun 2022 00:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20220518014632.922072-1-yuzhao@google.com> <20220518014632.922072-8-yuzhao@google.com> In-Reply-To: From: Barry Song <21cnbao@gmail.com> Date: Wed, 8 Jun 2022 19:48:17 +1200 Message-ID: Subject: Re: [PATCH v11 07/14] mm: multi-gen LRU: exploit locality in rmap To: Yu Zhao Cc: Will Deacon , Andrew Morton , Linux-MM , Andi Kleen , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Johannes Weiner , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Peter Zijlstra , Tejun Heo , Vlastimil Babka , LAK , Linux Doc Mailing List , LKML , x86 , Kernel Page Reclaim v2 , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , =?UTF-8?Q?Holger_Hoffst=C3=A4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain , huzhanyuan@oppo.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220608_004830_579512_C2AA1B9C X-CRM114-Status: GOOD ( 17.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 8, 2022 at 7:07 AM Yu Zhao wrote: > > On Tue, Jun 7, 2022 at 1:37 AM Barry Song <21cnbao@gmail.com> wrote: > > > > On Mon, Jun 6, 2022 at 9:25 PM Barry Song <21cnbao@gmail.com> wrote: > > > > > > On Wed, May 18, 2022 at 4:49 PM Yu Zhao wrote: > > ... > > > I can't really explain why we are getting a random app/java vm crash in monkey > > test by using ptep_test_and_clear_young() only in lru_gen_look_around() on an > > armv8-a machine without hardware PTE young support. > > > > Moving to ptep_clear_flush_young() in look_around can make the random > > hang disappear according to zhanyuan(Cc-ed). > > This sounds too familiar -- let me ask again: was the following commit > included during the test? > > 07509e10dcc7 arm64: pgtable: Fix pte_accessible() > > If not, it will cause exactly the problem you described. And what > about this one? > > e914d8f00391 mm: fix unexpected zeroed page mapping with zram swap > > Missing it also causes userspace memory corruption on Android, i.e., > random app crashes. > According to zhanyuan's testing, we can confirm the above two commits can fix the random android crash. Thanks Barry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel