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 96016C433F5 for ; Thu, 11 Nov 2021 08:57:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3121461884 for ; Thu, 11 Nov 2021 08:57:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3121461884 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 B9BD76B009F; Thu, 11 Nov 2021 03:57:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B4AF46B00A0; Thu, 11 Nov 2021 03:57:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9EC7D6B00A1; Thu, 11 Nov 2021 03:57:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 8C6666B009F for ; Thu, 11 Nov 2021 03:57:02 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 532A482D87 for ; Thu, 11 Nov 2021 08:57:02 +0000 (UTC) X-FDA: 78796044684.08.F4CE73B Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf16.hostedemail.com (Postfix) with ESMTP id BC198F0000A3 for ; Thu, 11 Nov 2021 08:56:51 +0000 (UTC) Date: Thu, 11 Nov 2021 09:56:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1636621019; 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=584DIdsyvBca92RfakMC01P1XDntGeuCyyCqi+igAh4=; b=OCtC8EYojZYUjpkm73umCxqa5FFtMAMxj1IDgJEYSXOfyNSjIjAyj2TnBJSj72cAjh8UCe AEjvpvDyYzsdXkoSlz0VVuL9oCFsONfrjoUMEyTfHAi27T8Fwl8VcvOZsoOm2eZsJI/xRQ YvyiqnvMPICBftfh/Sj+PqKVVCkzYps9Pjncdp4zmVVRN87LyZQRAyuoRDlSxdS5hvlQPe EZVe5n3e6hYuUW6OKU5lWWojEhD/vs2FXdNTGH0sqTt+FQZ1b/cIVpqR5HOjHskZ+oORGY NIyXhFCxK0InFmL2HnaS/ctj054LY6J46GTr72NQ8DZe7aHtLtbr5Esw1Qt+nA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1636621019; 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=584DIdsyvBca92RfakMC01P1XDntGeuCyyCqi+igAh4=; b=KZuNfptHRQzGESnotQN3dqaeR2cj43Np67qmOaGh8mtbqfvno1nWDlwuBHQ3tukZ162802 aKv6j+L6XW2SrhDA== From: Sebastian Andrzej Siewior To: Minchan Kim Cc: Andrew Morton , Sergey Senozhatsky , linux-mm , Mike Galbraith , Thomas Gleixner Subject: Re: [PATCH 8/8] zsmalloc: replace get_cpu_var with local_lock Message-ID: <20211111085658.44i2xdb7hec5k5b2@linutronix.de> References: <20211110185433.1981097-1-minchan@kernel.org> <20211110185433.1981097-9-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211110185433.1981097-9-minchan@kernel.org> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: BC198F0000A3 X-Stat-Signature: i58ywx94zpnty74nhbi1x8m3swqjye1a Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=OCtC8EYo; dkim=pass header.d=linutronix.de header.s=2020e header.b=KZuNfptH; spf=pass (imf16.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de X-HE-Tag: 1636621011-499032 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-11-10 10:54:33 [-0800], Minchan Kim wrote: > From: Sebastian Andrzej Siewior The From line used to be From: Mike Galbraith sorry if I dropped it earlier. > The usage of get_cpu_var() in zs_map_object() is problematic because > it disables preemption and makes it impossible to acquire any sleeping > lock on PREEMPT_RT such as a spinlock_t. > Replace the get_cpu_var() usage with a local_lock_t which is embedded > struct mapping_area. It ensures that the access the struct is > synchronized against all users on the same CPU. > > Signed-off-by: Sebastian Andrzej Siewior > [minchan: remove the bit_spin_lock part and change the title] > Signed-off-by: Minchan Kim So you removed the bit_spin_lock part here but replaced the bitspin lock with a rwsem in an earlier patch in this series. This should work. Thank you. Sebastian