From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3617C2E719B for ; Sat, 25 Jul 2026 05:30:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784957434; cv=none; b=bwoOFyGWiD1aub20JvRlVBDQuBunnvIa84A568Fu70n/WWO2jPlGOZ9zPSafb6AZGqA9xmB5BY6LHbJ+qOqumGVxsHMzg6EXrCrmsWx5nDxsWI+kXZyaOTd+1NJlQsaWC1+6/Pzh3qauCnoKcL4ssqJDhTyJZw3dHo2+1oyV8ZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784957434; c=relaxed/simple; bh=CPhAhWmdd1LN/C0TVlL7U+allin/u6N/LrQaSkYYfXo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d+MRKiPZ7fblcDJmVKujazQ/rCN8naAxPLog/vfFr4SkLIdWltK4wuUUcpgK0Yx9KucOS/f4iY5nLlHpaUkGRCKC8/3Er4A6zoxjZSgC8SzTLn047KRa9I6vMCV++a7pMJ9pKYOHjz2DDfJXa7jK0q+r6gT4nsOa/eX6+oNonBo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ctGr6Ela; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ctGr6Ela" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2ccf2360620so11043735ad.3 for ; Fri, 24 Jul 2026 22:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1784957432; x=1785562232; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Q9DTVZXLp+TNicZH9cYEyTowjXvC1RszrtcpW4YmnMo=; b=ctGr6ElaPRTrhIyjM54Ql+Fev3MEEAklaOQhq2BxNOmdHGFqIPfujgrA7lA+iROfk7 xJMcPvvNLzNMF4j1lHBEiu48XlCc40/cVJEg9Wiy3zARcEf7XvLA5HHhB9w3hIghgboF U7AZx8DaB4esg2H7NP24uDTdr8vLVTxJ1ihxo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784957432; x=1785562232; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Q9DTVZXLp+TNicZH9cYEyTowjXvC1RszrtcpW4YmnMo=; b=PKetG+GJObhfX9y5QgK23TK7orM6MnVlEqRi8JNCpKLARIvnABpfPhDVHqsXIjcpNZ m0u9ZoMSSQHMKRbTAhA0s21Z9z6sUUuWvCWnX+ou3KP1qkgoxz7w01lfPwM/IoGBBH6E rC9Ad/1qMEGyfhjoMSDK//DtMOHuA3H/eYzE/0I+JQpgXpphlSTRX5jYzs++S6F7w7p2 S0GZKX/D3wXxUMtvds9sVMf8bk+nO4U+mI8FIg9lk5+3Zu292wrYDeYAyO52AP30pDBI OyB6mykHEFdVmp9keA4pcYOH6rwgPfjRaH6Sai35SYHtM16mErZMgfZL/m9xkSLgfXxC 4Vrw== X-Forwarded-Encrypted: i=1; AHgh+RoC5uVgODqAdTOsp1XOVsxrGZdn/sFrOqdazD+Vcjbr1qbsq8uSQ/x56bCiiHD834fTOlY6N1/F7ffV/Mw=@vger.kernel.org X-Gm-Message-State: AOJu0YzZ8WavI4cRbuf9se/gSOV+G4Rruk8yhuKaJYl+5ix0vV6tyiZh v7/zquKM396z80kxV6QWaDeqZ2Wj6WC7AxvP/ZVQmQCKaimK7CHKq5iyv+CoyhLz1w== X-Gm-Gg: AR+sD13FrSbtyqF56i78fG6x73i/bbuwrpprfbvflIkbMTkBzj8b52o2OvWqDUMLJwf SnT0zHRR+89ESOB8nOGk6moa2E5ve2jR6dHEOoXoM0lQejevGauVz2lQRgAUUwujP2t67NGcQzl g13KlK1fJ/JvQlEqlmS16W41lKZkk8rS8b8mpcquw/H09NKqp5mBoGL+uzItAnf4E9G4ZXI8c4R STDr+/MNlmTAkTBXi+9g8m5z/4JFx7up8+zImgA7Wn7vZ1qONO0xx0/UxpZeuk45NdoR1xXH/R4 Gnq/SarHo96vCuEETDn4X6WPWik2xDh0Gw+f+ebhzP3LtUOBa4vBtEe9XtDpo/e1hEsEJ0ATh2R 1HZv7sU+YHnEllZJUrtiWPJhlx/L9fhePo3zTffzu2tf/xdIENDm6LvaQ0Xsri0AukeWNOyJFfC rpZwoePVD3+RR+qCjayGsQZFPbnjCp6zT/ssEXacC7V5V0yP8dAijD X-Received: by 2002:a17:902:f689:b0:2ca:3b31:ef4f with SMTP id d9443c01a7336-2cfde881841mr12489805ad.40.1784957432564; Fri, 24 Jul 2026 22:30:32 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:fbee:e165:c3f8:38a4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cfde7bbdacsm4958385ad.47.2026.07.24.22.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 22:30:32 -0700 (PDT) Date: Sat, 25 Jul 2026 14:30:27 +0900 From: Sergey Senozhatsky To: "Barry Song (Xiaomi)" Cc: senozhatsky@chromium.org, akpm@linux-foundation.org, haowenchao22@gmail.com, haowenchao@xiaomi.com, joshua.hahnjy@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, minchan@kernel.org, nphamcs@gmail.com Subject: Re: [PATCH v6 0/4] mm/zsmalloc: reduce lock contention in zs_free() Message-ID: References: <20260725035733.53241-1-baohua@kernel.org> 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: <20260725035733.53241-1-baohua@kernel.org> On (26/07/25 11:57), Barry Song (Xiaomi) wrote: > On Fri, Jul 24, 2026 at 12:55 PM Sergey Senozhatsky wrote: > > > > Apologies for the delay. > > > > On (26/06/27 21:36), Andrew Morton wrote: > > [..] > > > > Raspberry Pi 4B (4-core ARM64 Cortex-A72): > > > > > > > >   mode        Base       Patched     Speedup > > > >   single      59.0ms     56.0ms      1.05x > > > >   multi 2p    94.6ms     66.7ms      1.42x > > > >   multi 4p    202.9ms    110.6ms     1.83x > > > > > > > > x86 (20-core Intel i7-12700, 16 concurrent processes): > > > > > > > >   mode        Base       Patched     Speedup > > > >   single      11.7ms     9.8ms       1.19x > > > >   multi 2p    24.1ms     17.2ms      1.40x > > > >   multi 4p    63.0ms     45.3ms      1.39x > > > > > > Well that's a nice result. > > > > Indeed. > > > > > Sashiko AI review said ....  nothing.  I don't recall seeing that > > > before ;) > > > > grep-ing the code, I wonder if we maybe want to tweak some comments. > > Namely, zs_page_migrate() says: > > > >         The pool migrate_lock protects the race between zpage migration > >         and zs_free > > > > which is not entirely true anymore, as zs_free() has a lockless path > > that doesn't take pool look (when ZS_OBJ_CLASS_BITS permit). > > > > Likewise, __zs_compact() says the following about pool migrate_lock: > > > >         protect the race between zpage migration and zs_free > > > > None of these are critical, very minor. > > Does it look good to you if we squash the below change into patch2/4: Sure, looks good to me!