Received: by 2002:a05:7208:c250:b0:86:f851:443 with SMTP id w16csp949763rbd; Thu, 13 Jun 2024 02:11:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZ+aM5imAhrBq9tTR3eOcTrY6BbZQiQpDB+UfziVnt0bbUpRMHdN39owN4T1fKr0TeUhtRgkKIeiOL2qm8722vaKr7LzZRYvdc677brQ== X-Google-Smtp-Source: AGHT+IG8o5+NxUJtCDQV55kvNXjuzvkATzio1WCurBkS+ZjsRMQpgCQ/g9r//XHnetqy+zZRAJ6K X-Received: by 2002:a05:6a20:12c7:b0:1af:fa18:76f0 with SMTP id adf61e73a8af0-1b8a9c7d57amr4895063637.55.1718269901659; Thu, 13 Jun 2024 02:11:41 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee67b8887si880182a12.799.2024.06.13.02.11.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 02:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@oppo.com header.s=selector1 header.b="SSVqO/jI"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-212921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oppo.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1C5F42824FF for ; Thu, 13 Jun 2024 09:11:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0A9D13DDA4; Thu, 13 Jun 2024 09:11:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=oppo.com header.i=@oppo.com header.b="SSVqO/jI" Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2062.outbound.protection.outlook.com [40.107.255.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFEE913D8B2; Thu, 13 Jun 2024 09:11:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.255.62 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718269877; cv=fail; b=VEd6Uyh84WkT3Pe9dB0EM7s6svMFQ3a5P0lYe9Eq500/JcjbYztOp8s+O08O03q8xK2MqcOTW0LgQNeX8ePRuwLnewmoI1hh6o8JsAGFzi+VQksR95NbtCQTB2qqyQEFVzMMhud7WF3oGv+6aX/pr6lUdYGEB/AT9WoJnhS7tHM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718269877; c=relaxed/simple; bh=7sjjSFQywCt7jSBX8NAc7fV60e4i44xgOjvk2jo2Vhw=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=m0B1lF/SKlhWpYBhJ5zOt1XM+v6AhO+CAI1WXFdTQ20UN87e5HMGi+4C10qia0UUeGU/mzgD1bAVYdSwnXFzIFvZLcdc0H4eUuym65CT4AVe0yrukX0JT8eawwBxEudkPOvnGBooWx7gYT+enOA0CclHbFskA8/I/vJ3JRwJtdo= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oppo.com; spf=pass smtp.mailfrom=oppo.com; dkim=pass (1024-bit key) header.d=oppo.com header.i=@oppo.com header.b=SSVqO/jI; arc=fail smtp.client-ip=40.107.255.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oppo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oppo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g0wVhswaz68E1qDEC39LVLukxS/IAjQPIeMnWXZpXs9m9gqEZ8r0elLHSac2TGhqunQ3/IqodIgOrxwW8IkZRYNzOquA4gBGcB+yLLImmlPEpPRiL6n+FjH+6PsIBDhz4eY9HGhw161y0qxfm2NHCB9WCuLmmCnFMXtHTV9m0xhhsXGvRZzUMpV79BpE03VGWiv57isc5uJg7VUA0Bf5ZqaloGGI4LxnHa97IbANSSLgyIxPfxLNm27k/O/HE2JQjR0SDiv1VtqrCFJkvhQwzFN66MH27HXKUDzOnpZOtLksoK/TuPPNKFdobsOaZj5JntXkfJu34q3j49bCHJbpqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7sjjSFQywCt7jSBX8NAc7fV60e4i44xgOjvk2jo2Vhw=; b=PuoltwHduhTeB5FTWH7Y6gSXfE6QNoZtpsGg+yEF+HgQXJ0hG4qRkwlXMsBna0qqWf+UQmWej7xZI2xSrO/M3WH7gT5tn5Ad9ttE4AvMR/HWKw7sJ2HoeuO603+rWEbBfFG8gQaUAYr99DEJ9k3TF7Y1+94xUOBKvkQQDpiXzE8NV5pGcGsseSe6wDFRfKM0/YxuVfN085jsWPwVCYCqoLh2U7VmhYv5YosWGmkxLEgZzp4dvEE29c5u3lKdVENxAfaUcBy/dmDO3HqR3HQ9akLyYpGaGHkT2ppusuYtdso2ad1LVR9lPP4IciNXvhr0jKrGf2pdmYahYbqtZASglw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 58.252.5.68) smtp.rcpttodomain=redhat.com smtp.mailfrom=oppo.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=oppo.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7sjjSFQywCt7jSBX8NAc7fV60e4i44xgOjvk2jo2Vhw=; b=SSVqO/jIch/nlJjua1oYhR025L72B9DPn2dyj1oIX5zn/Q561EKIu7dnxYDDtrBnvkYt9JXBM6oaUascGekmJXg9/KTNr6Bo3FwpoM5xN0OeExWEdqvGWjt4UCQtH/ooKAg4UeE5kYRCwQ3LOwBeAAHRWmhlG/2pHAjisql3nuk= Received: from SG2PR02CA0018.apcprd02.prod.outlook.com (2603:1096:3:17::30) by SI6PR02MB7945.apcprd02.prod.outlook.com (2603:1096:4:241::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Thu, 13 Jun 2024 09:11:12 +0000 Received: from SG2PEPF000B66C9.apcprd03.prod.outlook.com (2603:1096:3:17:cafe::e2) by SG2PR02CA0018.outlook.office365.com (2603:1096:3:17::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.23 via Frontend Transport; Thu, 13 Jun 2024 09:11:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 58.252.5.68) smtp.mailfrom=oppo.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=oppo.com; Received-SPF: Pass (protection.outlook.com: domain of oppo.com designates 58.252.5.68 as permitted sender) receiver=protection.outlook.com; client-ip=58.252.5.68; helo=mail.oppo.com; pr=C Received: from mail.oppo.com (58.252.5.68) by SG2PEPF000B66C9.mail.protection.outlook.com (10.167.240.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Thu, 13 Jun 2024 09:11:12 +0000 Received: from oppo.com (172.16.40.118) by mailappw31.adc.com (172.16.56.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 13 Jun 2024 17:11:11 +0800 Date: Thu, 13 Jun 2024 17:11:06 +0800 From: hailong liu To: Baoquan He CC: Uladzislau Rezki , Zhaoyang Huang , zhaoyang.huang , Andrew Morton , Christoph Hellwig , Lorenzo Stoakes , Thomas Gleixner , , , , Subject: Re: [Resend PATCHv4 1/1] mm: fix incorrect vbq reference in purge_fragmented_block Message-ID: <20240613091106.sfgtmoto6u4tslq6@oppo.com> References: <20240607023116.1720640-1-zhaoyang.huang@unisoc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: mailappw31.adc.com (172.16.56.198) To mailappw31.adc.com (172.16.56.198) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PEPF000B66C9:EE_|SI6PR02MB7945:EE_ X-MS-Office365-Filtering-Correlation-Id: 13694598-8edb-447e-cd25-08dc8b88c59d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230034|36860700007|7416008|376008|1800799018|82310400020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Q3QvMVY2dUkwMDZiTmphenRBaHM2dHhCNlJsY0VrcUZkYmwv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jcmszY3BJMytMZlBZ?= =?utf-8?B?ZEFGSVZKeDdhdGVLd3NNL3AwV1dlNitMTWhZNmZWTnppUXc9PQ==?= X-Forefront-Antispam-Report: CIP:58.252.5.68;CTRY:CN;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.oppo.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230034)(36860700007)(7416008)(376008)(1800799018)(82310400020);DIR:OUT;SFP:1101; X-OriginatorOrg: oppo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 09:11:12.6096 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 13694598-8edb-447e-cd25-08dc8b88c59d X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f1905eb1-c353-41c5-9516-62b4a54b5ee6;Ip=[58.252.5.68];Helo=[mail.oppo.com] X-MS-Exchange-CrossTenant-AuthSource: SG2PEPF000B66C9.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI6PR02MB7945 On Thu, 13. Jun 16:41, Baoquan He wrote: > On 06/12/24 at 01:27pm, Uladzislau Rezki wrote: > > On Wed, Jun 12, 2024 at 10:00:14AM +0800, Zhaoyang Huang wrote: > > > On Wed, Jun 12, 2024 at 2:16 AM Uladzislau Rezki wrote: > > > > > > > > > > > > > > Sorry to bother you again. Are there any other comments or new patch > > > > > on this which block some test cases of ANDROID that only accept ACKed > > > > > one on its tree. > > > > > > > > > I have just returned from vacation. Give me some time to review your > > > > patch. Meanwhile, do you have a reproducer? So i would like to see how > > > > i can trigger an issue that is in question. > > > This bug arises from an system wide android test which has been > > > reported by many vendors. Keep mount/unmount an erofs partition is > > > supposed to be a simple reproducer. IMO, the logic defect is obvious > > > enough to be found by code review. > > > > > Baoquan, any objection about this v4? > > > > Your proposal about inserting a new vmap-block based on it belongs > > to, i.e. not per-this-cpu, should fix an issue. The problem is that > > such way does __not__ pre-load a current CPU what is not good. > > With my understand, when we start handling to insert vb to vbq->xa and > vbq->free, the vmap_area allocation has been done, it doesn't impact the > CPU preloading when adding it into which CPU's vbq->free, does it? > > Not sure if I miss anything about the CPU preloading. > > IIUC, if vb put by hashing funcation. and the following scenario may occur: A kthread limit on CPU_x and continuously calls vm_map_ram() The 1 call vm_map_ram(): no vb in cpu_x->free, so CPU_0->vb CPU_1 ... CPU_x The 2 call vm_map_ram(): no vb in cpu_x->free, so CPU_0->vb CPU_1->vb ... CPU_x -- help you, help me, Hailong.