From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.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 C80FE7E792 for ; Fri, 14 Aug 2026 04:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786681749; cv=none; b=KTPquRQ4Z+eo9iSundoNeCpf3XEfICodtV85OEPXGgyTTQRwdfvuIXKXG7lfRF80XX64pQ+znPI6FanKQU7GYVk1wLrRkTUOq59XGqazxyre1shoKHwJw7xi/bPkKh2yteGlyyeKDo5VAWpm9S8UfbB7gc9GkSuqskRI+K6/j/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786681749; c=relaxed/simple; bh=uGO0FncnMKMgH7t+hzUpQmquxacoFasPuEbHUGTrw9M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iaoIuywd+HAmBM2nZoi6QZBY80Iq/BUISlFLWrjqFvPhKjGfMu+KZ0WXpeuawxcqwaTcqMZlpy/Aw1rV6AASBx26wNv0+z2m6VGuw4mAbFpZqFtWEKVPXPI8eBes1gBNx50HkG1EwvpHlytsuBwYHCDQnf9BUI85OToH94wY52M= 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=MG+t1J6F; arc=none smtp.client-ip=209.85.215.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="MG+t1J6F" Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-ca97d139d5fso505850a12.0 for ; Thu, 13 Aug 2026 21:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1786681747; x=1787286547; 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=9YV4tfg2m9+nVp0ZHuk/9lCg/ZtZzpaoDWN5osX7Noo=; b=MG+t1J6FqZ8zqyAiVikJaUEh1LM/ceCDGu5NuhVzh6pBniz6o8xBM1vlxnuhq9OfSZ a6+mUIcXNT46vYriq4nunu3iEyZwra0Jt/Ghw6CzCVTfw8biBCGpZhwSmIlnVs4fYNme l9P37zmHNPjjks0HLfrwI8nwix+ULcZA7sHw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786681747; x=1787286547; 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=9YV4tfg2m9+nVp0ZHuk/9lCg/ZtZzpaoDWN5osX7Noo=; b=F59sAYc8PI0RTmsIzdY6zqslchg7m8foAprHYaOiTMp890nyIhLawwWuzHc8ZiUVYy j3aQm2Uzkk1aWqhWiwvYsQNdgG5/92JyVPEVTfld6YLERx69DI/oc96CKZHLtdohnlXM LSklg6Hh677jqGR7qpkfTwAhpK2OozaIX8sLE7zyA62wbQ00H1gWFAcnYF0sqCFdGSqS NQkvPerVuWRQG5gzSidGU09cxMdO865XW/8dMYTivIyRjgtykNiSadIDxtdYy78IJzdI uS62kJiNI3I/RIvbXIOtBwvzD0tcH4EQ/TTM2sG+Y6C6WFTwKbr6AZpa5BM1jac/MpAs 9zwA== X-Forwarded-Encrypted: i=1; AHgh+RrVgaVEdwGeyA5VuLpIPf6Wp6Vh5w28z8PNpsw/gduf0UPsZLkLJc6a+xPUNYfvzIHm8gcV0/9JW7sgFAs=@vger.kernel.org X-Gm-Message-State: AOJu0YwzWxFuuK0U/G7iJeaAj9rpsn9biulxr7JOnPqlhFU/g7tJZK/C ppbu6x4ljV9vnd/Tb0X4tnXNAdbh8TVF385bD/d4LhZ727KtUn9TL6+KFI4suI1yyQ== X-Gm-Gg: AR+sD10uONHL7x5hwcszkB3RGPKx8Al5//RQGkGI2hnLer47Wgq+zfUwdgoanUh2Rll 4f8852OLvb7FBrwFudIbCfNnbRe37lHMfd3ALPxSg8tOozG6xYGNX9T49+u5VtByUlwlsrdcF5L Az/rnLmH6XYFlqc27IgI3MSbT+iWZm0SXpq3GG/s0eIkv5CxkjsMykwZYpprFmttetSOCc022rQ tmvtW3mUptVAR1pb7AMB/hMy0RQtFq19NteG4blN3qfds8+X2UXIE966wh3g1KFLDEZEiwdXyGo uC8x7K8fUHx7SU9zqSt8RbC394RZLt/iI4e1T9AhaTWIAzAA03+PsWQaFCggE0fi7G4xIF+zoEB o7ngs+XSHSdha0u/HsrMEa3FWfZdHCYPWezfMge2sPmAOw+25Cb9KN9jcpx/ma2ULhqDh2HEDED GC4akd1EV7il12bTJhzoEeTdEP11Daya0dv3OX+EssZ9i4M++56dFavC6iAZhH4yHP56JID97ML GWydGMW3UyLRP2itsyxgYe/NpU= X-Received: by 2002:a05:6a00:3ccf:b0:845:40d1:87fa with SMTP id d2e1a72fcca58-84fde20e2a4mr2922939b3a.25.1786681747221; Thu, 13 Aug 2026 21:29:07 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:ecab:fe19:825:5aeb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84fc4565c6bsm1584682b3a.3.2026.08.13.21.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2026 21:29:06 -0700 (PDT) Date: Fri, 14 Aug 2026 13:29:02 +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 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: Hello, On (26/08/14 08:07), Barry Song wrote: > > On (26/08/05 08:55), Barry Song (Xiaomi) wrote: > > > @@ -128,14 +128,20 @@ struct zcomp_strm *zcomp_stream_get(struct zcomp *comp) > > > * so then unlock and re-try on the current CPU. > > > */ > > > mutex_lock(&zstrm->lock); > > > + if (!comp->ops->async && !IS_ENABLED(CONFIG_PREEMPT_RT)) > > > + preempt_disable(); > > > > We take slot_lock(), which is preemptible, under stream lock on > > some paths. > > Hi Sergey, > > As promised in [1], those patches are still under testing on real > Android phones. However, I'm quite curious which path takes > slot_lock while holding the zstream lock Oh, I think you are right. We do the opposite: stream lock under slot lock, and we also do the stream lock -> zsmalloc lock/unlock -> stream unlock -> slot lock/unlock chain. But it doesn't look like we ever do stream lock -> slot lock, you are right. Sorry for the confusion.