From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 C0C9A472F71 for ; Fri, 7 Aug 2026 12:13:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786104791; cv=none; b=VC9Kw9DtZPu14AC55JjEaoXgSUSN9R71v4/xqdJDvV8Uivqq979rWkyF+FdRPPe/80x1prgSDVOjpDY8ZZSladjOV81H4rBjno9rJCESavQD5dg8qmweDrCFFjAcbmZR0h5yOykvU9LYRTUETCHgbsbDyhKPlkihX7TOalsyXXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786104791; c=relaxed/simple; bh=F96qMfzv/HUT7wSxm9pRBm5mcWikNM4hnAnIEzhVFjY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pGhxdzJ+wXzzlvO9xBLdovJty9mwdMA9S6usKvA2yy3VU3NoglY9O190kLEuCGD4C/xsH+K7o+z7zzDIKmJnFl4xM6bg5FLfe1KHKaGVttF7S6ZHFmlRxgjI+dy1/jJXcMEkAYFWBCho1rfOVsCRXUBCV40uL6RRiSwXH8CfNP8= 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=Y7e9C1fR; arc=none smtp.client-ip=209.85.214.180 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="Y7e9C1fR" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2cacf197759so52229775ad.2 for ; Fri, 07 Aug 2026 05:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1786104777; x=1786709577; 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=ylGtr3wTi2UIZ9hml4U3d5jZyhzF4W3bx6zGmARmG4U=; b=Y7e9C1fRZAJHyKYKiAfWvdcW058so1wsd4WiGw/cIYnhU9myEm0OdIocgYnXFFbuLD jYhrjJx/gOQVV8uMqIolGrRhAE6pIvt554swPc1dsO2cHb73Cw7PAvUgpSJM2UgfxZgV bInzhtK0XDJAXoKG2kFGSmsXnrjlDywJpjYI0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786104777; x=1786709577; 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=ylGtr3wTi2UIZ9hml4U3d5jZyhzF4W3bx6zGmARmG4U=; b=n/2cU3qIuUQLf+sZSD+UiGzko6hYIrdVsrjTyAIEm8dWPeZBxqaAvw3Z+7mrTkvRHV utyPWqO8f7x2gppk3wpdGyttfgF0WxIKlXbTli27RZJrk/YJ7eru9NfXRg1QY0qt48R/ XsQn3T8S1q/dixbbqXSX0EQ3q2qJ5sIDRqzBEuMPyVqZYLkFp9CrsCuc+MnSeXWxi/Gt MkZGUzMvlxLei4Yfik8daNLtv7Rl/gGPt0qDP4WQDDzB7PF0DbZqweVviGvnoKpTzwUI 4OGpT+19JgPCSmGP7CzvPZAL6QWvXE+ecnE+krLu1QMVFnsI42El7JFF+yDZNuTuRkJp Jufg== X-Forwarded-Encrypted: i=1; AHgh+RqIyk0Ad/k43K9TEQQx29EaaerzN0eBlYNvr9wPUvO4Bg8MVFwiGJ0u2N5AixP8iS6KR/0T2GS7wtlBabo=@vger.kernel.org X-Gm-Message-State: AOJu0YxMK7aw/CjfTkp37a7HWyInxEf8dxB33qemMIUq1QSHjGguAXRk U0I/HKSRpccvzHY0nJ2x5gtVSv7tywszNxaYl+kjjVYeIUHVL72jMf/euY0++XrrEA== X-Gm-Gg: AR+sD10EL2ymg4YfJTOl59zitKC+v8GSOrNimyh+HkL29gwU0KQgYXkxX9u5RU/+T/O wAf3HrKBJ+/AxU6Bt+1+iU8K1T4COzBqjxmK2pPCtQpFdccZL6ihu+IdPr9Ah8pEqLVHk0X5uCa wkjiVYizFCxfbg7Krwck6GgPcBpInoqSMZ3k4tIxiKTfE0L9BcsVkBUlr91fCWcrZboRHMmAgw9 shcPPSr9W+AYNVQHLV4gVHkQ54IwHrqF11ET7rNDNkknkiVC4KnBJNuBwu/zehINMcTy0F/2Rgn DKdHGiJkGM6rR0zs4NEKwUlTOvVtpFvm3X7lKOeyxgo//AcjjE8+8UJ5T4rlqZtPC2V+Evo6cCu aUP3dw51DKF8Z1+jqHWMKmsswgRXJwr/ynR6GJ5K5RZXQsdy61xgrmu90TJRjgGgtD94Axwc+PI fSktawFvcnV+DsRwBBm5Omt/crGOfRHhVV8uiiriuNQMT3TF2HT18bhMHsAXdLX6YeWqy3DaFwi o3pTL8oMoX+6ZXSrn5JkuR9aMik X-Received: by 2002:a17:90b:38d2:b0:38e:2f21:3bb5 with SMTP id 98e67ed59e1d1-3926237cd78mr3735642a91.21.1786104777150; Fri, 07 Aug 2026 05:12:57 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:f4e3:f7a5:b8dd:b3e9]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-39085dea04bsm4903670a91.8.2026.08.07.05.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 05:12:56 -0700 (PDT) Date: Fri, 7 Aug 2026 21:12:52 +0900 From: Sergey Senozhatsky To: Xueyuan Chen , Nhat Pham , Barry Song , Yosry Ahmed , Johannes Weiner , Brian Geffon Cc: Sergey Senozhatsky , Minchan Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, xueyuan.chen21@gmail.com Subject: Re: [RFC PATCH 0/2] mm: zsmalloc: make shrinker compaction budget-aware Message-ID: References: <47ed45b5-de67-41aa-aa21-a3ba3479a7cc@vivo.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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47ed45b5-de67-41aa-aa21-a3ba3479a7cc@vivo.com> On (26/08/07 18:57), Xueyuan Chen wrote: > Hi Sergey, > > Here is some additional data: > > I used the following definitions: >   compactable ratio = freeable_pages / total_pages >   memory reclaimed  = pages_freed * PAGE_SIZE > > freeable_pages is the estimate before compaction, based on the same > calculation as zs_shrinker_count(), while pages_freed is the actual > number of backing pages released. > > There were 264 callbacks in the trace: >   callback elapsed time: >     median:    5.77 ms >     p95:      55.82 ms >     maximum: 271.36 ms > >   compactable ratio before compaction: >     median:   0.32% >     p95:      2.86% >     maximum:  8.33% > >   memory reclaimed per callback: >     median:    3.80 MiB >     p95:      30.45 MiB >     maximum:  92.73 MiB > > The longest callback took 271.36 ms. Its compactable ratio was 3.25%, > and it released 7,650 pages, or about 29.88 MiB. > > There was also a 241.91 ms callback (with 30 schedule-outs) with a > compactable ratio of 0.44%. It released 1,019 pages, or about > 3.98 MiB. > > Based on this data, it seems better to remove the shrinker. > > Would you prefer that I change v2 to remove the zsmalloc shrinker > callbacks directly? Let's bring in heavy artillery to this discussion, in addition to Andrew and Minchan, adding Nhat, Yosry, Barry, Johannes, Brian (random order). Folks, I'm bullish on removal of zsmalloc shrinker callbacks. I don't think those buy us much apart from memcpy-s and lock contention. Systems that want to compact zsmalloc have a sysfs knob (and API) to do so (based on zram mm_stat numbers). Any thoughts?