From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 B06CB3AA4E0 for ; Wed, 5 Aug 2026 02:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785895756; cv=none; b=ECKzD6VoZ5bI0IhnTLgSa4dT81e8g7oCLf/8+g5eatShJBduiH5ltvrKQdmuquKPq/Wmw6Rh9cOhmkExcTOmeys5iC24ImCyjoROQdguBeUaniUj92Vf4z8uO1iRdWlnc3UYGdjg4H7lq4j7UbzQLctZs59rye0LNRMtpI0+FOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785895756; c=relaxed/simple; bh=2eUX0/oz5rMyw2l9ZYGGPYDYEi4GBw3XlWSU/bTfvqs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OPtuAVwdHatR3XYUhL+9yOeml8dgaTs2bJHJvGDSOZpmOHyjl5Y/yiJXk03JwPc55IHTLIeStB4ZLAanyZbwff2jbZic20kHaQ0bTj2smmzWj8JCDrCXLFTNNkZxpHd4rM7Aw17UKV2tNTZfiVLySJkWHhTg4VCzfaHIY0+2z8E= 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=c2mSekUM; arc=none smtp.client-ip=209.85.214.169 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="c2mSekUM" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2cacf197759so7492145ad.2 for ; Tue, 04 Aug 2026 19:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1785895754; x=1786500554; darn=vger.kernel.org; h=in-reply-to: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=S+S6S6s3ykcDL+sn4RRyfl6V6n9KypIakUfUNmNrjYg=; b=c2mSekUMIkXuLgl07IHPwf3w7SC+EKhLiM1ZpMUvMePBnLE30WCzgwZNuzSNpHwfO9 s7xTIvbkND2BClyubX/5buPllak24h343Yel6FW7F17bz28oX2a/Y/X7OB1THQ9/PSsz Om3zIUr63+pxOQr7qc0r21UnakDyfE8D2hLWM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785895754; x=1786500554; h=in-reply-to: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=S+S6S6s3ykcDL+sn4RRyfl6V6n9KypIakUfUNmNrjYg=; b=UJNr6ukTFxv7iLYpU2k3A+rxZcIKIlV7uZUO8UYOj/wiB+VITe+PTHr36tJqCerQvA LMOlFCOQpXsNrbgJPqZ7/TKW0LQ1GIi+pTFzmeTDum7OjJuFZ+NfcYfFI/IjKC6wpL8n IqTMciSAbN56Td+yPLiHldJjif/NNRgnNVmCvpqJ59OKGk5DP6Bsj2ououGqX2sw6GiB GOUDYB1rWIoZMczHduKNSoL1/3/+Fz++B9F9QXC2ERlA0U2KkRZjgpozf3PrSedN41X3 TXlehplsEZXtkc6LSSUdQ6/ihqc63KkOSG0r46aFdWjT0BPuNQqvYdEMkMhHtOKSxgXz WUHA== X-Forwarded-Encrypted: i=1; AHgh+RqaM5B6WV46NmGuDqCUhBpBqOHj2eca2ykzlcN2nRNF3S/CXzKgxQQz7D5INTqOm/UV9462GvjUEaVuyyM=@vger.kernel.org X-Gm-Message-State: AOJu0YySC+xVa4W1IscpAEHLs2ANeBCn7T6JUHlvTRrh2kC2SL6GJPa0 +eFCEetTdxOFbZWx5ccyyYQ5nArNAD71fosHQdEtk6mG4eLzdpedfwfFZkuEUNgrzA== X-Gm-Gg: AR+sD12gcqjPtq38KVKA8GknCnuwzlId5l0dvtxnZBG3iynKTOKgbM9x4AE1pT61bto ncD0XT54mI/Cs8klkyXX2kWDnwwMrDI0BsXCi/lI39/OrL68wrvjxNu99/TSxusNR4TIeFw6FJR b08/WlCJH8jk8pR74ovbrAy5W6Qz9xpWnPwZz0TYGD/IvOm4XeQa6cmuHs50Eih4WrTEQdGyToX Xy6y1N4UKGSSjwnW89BbLyRNigHZpG+58PP5bQEjV7oa6lxcZQl5Qf9bq8N4nI+LkE3DmE/zszk VkyugHhIgbO/Spl/TYVLrMo11rrHDrrXlloXzBhCe+jiFy5de0tSs8S1o+OKlw1EYrGD8F59pAs ppQc4IGMl926Rh3uMu/xRdXQdwnr2Y+IcjWyKV6YmTbl6IBoILqrtfatMULhku7eMin61YMbktT w6HIAROcijEhw8rHQcRWiUkY4dqSJ3rok5HVfQwzQniC26RpmD+CmD4CUosYxWo5K+1PcyRJgRK PXUyD53PRsFpHDt3wJkQQguTRNt X-Received: by 2002:a17:90a:ec86:b0:38e:bbf1:de34 with SMTP id 98e67ed59e1d1-3903c537a12mr3426590a91.7.1785895754136; Tue, 04 Aug 2026 19:09:14 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:32eb:b46b:e9eb:65c5]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-390392b2b7fsm1235640a91.14.2026.08.04.19.09.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 19:09:12 -0700 (PDT) Date: Wed, 5 Aug 2026 11:09:07 +0900 From: Sergey Senozhatsky To: Barry Song Cc: Sergey Senozhatsky , akpm@linux-foundation.org, bigeasy@linutronix.de, hdanton@sina.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, minchan@kernel.org, ryncsn@gmail.com, yosry.ahmed@linux.dev, surenb@google.com, Dongdong Zhang , Suleiman Souhlal Subject: Re: [RFC PATCH] zram: avoid preemption with CPU-based compression backends Message-ID: References: <20260805005545.66112-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=us-ascii Content-Disposition: inline In-Reply-To: Cc-ing Suleiman On (26/08/05 09:57), Barry Song wrote: > > On (26/08/05 08:55), Barry Song (Xiaomi) wrote: > > > Since commit 2efa9e9eb4db ("zram: permit preemption with active > > > compression stream"), a major Android regression has been reported. > > > > > > The reason is that compression/decompression is now sleepable and > > > preemptible. This means a stream may be migrated to another CPU or > > > be preempted while holding the stream mutex. As a result, high > > > priority UI threads may get stuck waiting for the mutex during swap-in. > > [..] > > > We add an async flag (currently false for almost all backends) to > > > indicate whether a backend is asynchronous. For synchronous > > > backends, we use preempt_disable() in the !PREEMPT_RT case. A > > > > I wonder what does that report say. Is that what I think it is > > (we discussed something RT related privately recently)? > > This report shows that the zram mutex has become the top lock > contributing to UI frame drops, even surpassing mmap_lock, which we > are also addressing in multiple threads. :-) Any chance you can share more details? Are there perhaps RT tasks in the mix, priority inversion, starvations and so on? Can proxy execution address any of those (if it has relevance to the report you are looking at)?