Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp524109lqs; Thu, 13 Jun 2024 18:44:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUNyjZrsR0plpQaUax2AWzvr3If1hkh8pfM90ksSD5ZAwoUNWRbeAJZh9yALZcqDUeoFAVf+IX9vQmRC19Jrwu9EGLIkOYQQ0EIMs0hDQ== X-Google-Smtp-Source: AGHT+IErBc2MAUWXnIu+e9sXNS6OiCB5CtL70nxWZV3OOnZ8yKC+DQj9Ke2mNBLdz+Uy5M70cAeq X-Received: by 2002:adf:fe12:0:b0:35f:2f14:b98 with SMTP id ffacd0b85a97d-3607a783420mr1133825f8f.48.1718329470098; Thu, 13 Jun 2024 18:44:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718329470; cv=pass; d=google.com; s=arc-20160816; b=bY9oFbUzx8bytiGKhosdhw9CAxFVSaQS81VGTa/zgDsE8VZIUF44owKNuuOpzaqlH5 jYFZLY02Y2Y75/g5zW8dLHJZMxSW/1oXuuM5SA28tsCJ/KlVBKMY2e/Pfd8TE5z1/KyX dA0bmU/I2rE+VdNJGehnbD4VimhitjI8BbLZXpE8gEfG957YWEVjjslZqy6k+APm6i6v qqRgIHphq7dqiOo2stSifVeYhfrq8Djt4RuBDwRv+x075TSsJye31frWqWhC2/pgJY7R eVZFF4EtIqcnRb11aqcepmOUG02s4DM0qwGPIif+XDHepsDetPUp+q1uOMP/7dXXYpUU 2PcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F9lKE8hYmf6g8IWvc3VrycK3qfVps8kbUy/YMAHDU0c=; fh=CGlFXk/DWVei6KZoZW7WF6k78uEYBVzEMjE828ZmOGk=; b=StR+eEsJg+86mX1zIZbF2v/pjxwDWU8YKK9nEj9qUH3VTzXl47OiSjO22ZruXsR0w3 c+CedHZ2CGywUsCCkYisjGilDN1Vi0tqm/ecBr+MX3jB0ySo46ehO724sQTGiZ8ohbx3 qvI4Vknx/ZcX72Koicd+r/j/q/7MNTa8rK7RAHKtq6+VrIQCu6ZKyDmMRszzvUoc6T9P Bwl1EshW/5tJRw9+ifyosWPD2rozxNJWCi+tS79+rHiAl9t6ZjonCtF7SvCPs0cd3i42 3nQZMJzcyZy5DoJg2Yu2G7ACaCpjbhY/HnaL/AqwPFcb7+grr6YbgCpEmJ2sNexf+yqk BTzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hKmbauOo; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-214189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d21823si118258066b.46.2024.06.13.18.44.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 18:44:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hKmbauOo; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-214189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 am.mirrors.kernel.org (Postfix) with ESMTPS id CEC9B1F22443 for ; Fri, 14 Jun 2024 01:44:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37F8C1822EB; Fri, 14 Jun 2024 01:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hKmbauOo" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 CC72965C for ; Fri, 14 Jun 2024 01:44:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718329463; cv=none; b=utUkzseVWtk0617Oh06/v9hQPIN++uKVph0/8jpYID+KDiNTqKUOq5ChQTgYLnK6lMfh+DsSGf+4b0/2MKKmdY1ziyyc2gWeVM+ViDpEk16dSx3MDVqP+WpdVH6dbKx9unItZWc84D4IkAS2jLYbJUghCxTDqjHNxx65YHR/+ME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718329463; c=relaxed/simple; bh=+RCWV73DUVEVHGiyqZFoF+gZrjMk5TB4BjKep8k6Pxs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=edrncYlh5A61VeWCIIh94eFskWlyhBjkQaXim3ryiV8C2jaAF9V2C2ggF0ANPuU1xGJsTGT7pS/6qJNA1+fV8M23B9IGKJgZoRw6QveZuOIyXc8L/92prsTdx2D77NruVGUnpfJbNKKaYyMfZMVUvO4utYmqqEVhuWklS5U24d0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hKmbauOo; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718329460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F9lKE8hYmf6g8IWvc3VrycK3qfVps8kbUy/YMAHDU0c=; b=hKmbauOoiUz08LsLkfz06cykSP7ZzmmlHQ1wXZs6Qip3iXUzGbeqoqYAyOvp2HCFsLCXgO FSp1LaTzkantFa6e9IV5E/m6MHg5yxMsut4BOpmGn6TUTPL6FAKUguDCFE3SXWnNN/GZ85 0MIyCiQiAnGlyxxCX9htL29OS65B3/A= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-aN38hECoPl2QwgrDPMIVkw-1; Thu, 13 Jun 2024 21:44:16 -0400 X-MC-Unique: aN38hECoPl2QwgrDPMIVkw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 011231956089; Fri, 14 Jun 2024 01:44:14 +0000 (UTC) Received: from localhost (unknown [10.72.112.37]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E8F5B19560AA; Fri, 14 Jun 2024 01:44:10 +0000 (UTC) Date: Fri, 14 Jun 2024 09:44:06 +0800 From: Baoquan He To: hailong liu , Zhaoyang Huang Cc: Uladzislau Rezki , "zhaoyang.huang" , Andrew Morton , Christoph Hellwig , Lorenzo Stoakes , Thomas Gleixner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, steve.kang@unisoc.com Subject: Re: [Resend PATCHv4 1/1] mm: fix incorrect vbq reference in purge_fragmented_block Message-ID: References: <20240607023116.1720640-1-zhaoyang.huang@unisoc.com> <20240613091106.sfgtmoto6u4tslq6@oppo.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-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 On 06/13/24 at 05:23pm, Zhaoyang Huang wrote: > On Thu, Jun 13, 2024 at 5:11 PM hailong liu wrote: > > > > 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: Thanks for the details, it's truly a problem as you said. > > > > 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 > Yes, this could make the per_cpu vbq meaningless and the VMALLOC area > be abnormally consumed(like 8KB in 4MB for each allocation) > > > > -- > > help you, help me, > > Hailong. >