From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A729C433F5 for ; Thu, 30 Sep 2021 06:43:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CB216615E1 for ; Thu, 30 Sep 2021 06:43:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CB216615E1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3C70B940091; Thu, 30 Sep 2021 02:43:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34FF594003A; Thu, 30 Sep 2021 02:43:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 216E5940091; Thu, 30 Sep 2021 02:43:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 0DE9894003A for ; Thu, 30 Sep 2021 02:43:04 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9CAF21803190A for ; Thu, 30 Sep 2021 06:43:03 +0000 (UTC) X-FDA: 78643297446.22.6189814 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf08.hostedemail.com (Postfix) with ESMTP id 3233E300024E for ; Thu, 30 Sep 2021 06:43:03 +0000 (UTC) Date: Thu, 30 Sep 2021 08:42:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632984181; 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: in-reply-to:in-reply-to:references:references; bh=dnEW7f1DmEilZzuNLvihemhNUofBkwdxk5YV/ze4Urk=; b=w7Vptg1kMvD95GcxAKU6GHcbci4HCMT015lri2RxTnPzpCohcuKXgDIEKFSaKo9hu/tfOp dCh1uJBY4qCAHokhko/sJ2LCGi2W+y1VmwNWgddnPyHAd4Gpnjp7HG9XE3FHt3TIFgd4BZ vHUwBL/L2C0jRB0L/ePssfZoc4s5JxR0HjOBxEwZdMic0zJGGCVO2U8xbABxH5Z2Wq78z1 IWtf0Jp4MEsyE/rdR79ICALVZAaGuBDMjX0zlDNNzQnL+ZVANJHuoi25+T/MpHU63ELfqN V9FxYBdlI+ut3H5zBfS0ZulSoP+fguIRG0VJM6Kv6iOzhhicEiCq4jl3s0zhxg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632984181; 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: in-reply-to:in-reply-to:references:references; bh=dnEW7f1DmEilZzuNLvihemhNUofBkwdxk5YV/ze4Urk=; b=FO+rTaU5dbb9nWAHoVMYuq96V5TBw0jxRJPSQLy7Y/ykQEqDg42qvveCz7c9KplVk1VgP+ DI+UwA9Igww253BA== From: Sebastian Andrzej Siewior To: Minchan Kim Cc: Andrew Morton , linux-mm@kvack.org, Thomas Gleixner , Mike Galbraith , Mike Galbraith Subject: Re: [PATCH] mm/zsmalloc: Replace bit spinlock and get_cpu_var() usage. Message-ID: <20210930064259.dqvogmk42zporwa2@linutronix.de> References: <20210923170121.1860133-1-bigeasy@linutronix.de> <20210928084419.mkfu62barwrsvflq@linutronix.de> <20210928154723.1b0577818143734653d9b129@linux-foundation.org> <20210929072359.zkzg57gf362tc76m@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 3233E300024E X-Stat-Signature: psm3ox154eu1hcxo5dcoh86zo9ewdg9r Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=w7Vptg1k; dkim=pass header.d=linutronix.de header.s=2020e header.b=FO+rTaU5; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf08.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de X-HE-Tag: 1632984183-508235 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2021-09-29 12:09:05 [-0700], Minchan Kim wrote: > First of all, thanks for the patch, Sebastian. > > The zsmalloc is usually used with swap and swap size is normally several > GB above. Thus, adding per-page spinlock is rather expensive so I'd like to > consider the approach as last resort. About the lock contention, it's rare > so spinlock wouldn't help it much. > > Let me try changing the bit lock into sleepable lock in PREEMPT_RT with > bigger granuarity. Okay, thank you. spinlock_t has always four bytes without lockdep so you could fit twice as many locks compared to a long on 64bit ;) Sebastian