Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3226480pxu; Sat, 19 Dec 2020 17:21:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJAiSgj7QnFFKfAoC79og1R+Fl4mqVN3XsMElT7+fbyOxEjKY/gos2+K7YKtj33ZB9JWuo X-Received: by 2002:a50:cdc8:: with SMTP id h8mr10791623edj.293.1608427295563; Sat, 19 Dec 2020 17:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608427295; cv=none; d=google.com; s=arc-20160816; b=KffcG5cMu8DXb7PIgObzmzPItJQARuX0Cw5r2WUxenp53rh8oHwvAHl+3wur8Kr8uW ASvS92PqmDXSX//Yx5qirtc2VObifAEEfdujCdoUfPLklK04T+d/CC6mal7hgudYevO6 7tre/QjmOTrCA1XH7EFVy85hRaf9470d7rfcjCZjBHOpIW5Ps4QngWRNS/NjJfa0Sx28 YBy4W6v/T9CmDwpWhFyPenjfNxgs2u276sWHlpH8D0X/LBoTL6yNaT39MarzPCqdctO1 GXWqdofW+i9fTonXFWQlz9hsJPbmDr13OEFMbLvbTV2qg0IORUoK+5ByU36kjNozfI85 Q5ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nTty+Jb7NFfcXZE4+MmMpQCASKTBw2ev6K5BlwoCsxM=; b=o8+I0FRhKmdELMn+lkf1HnmaCTx47YpeSMpBswX6Cuk6zWJvI9d7mVrM7B2ciXw6xj xzTidE7C1/mTbaj7EhhJW17QQC72p02DMQc4JmmQsxb0UMFeD9til6KlnyYnTTUgTb15 pO3WJBdQGG92iSxdGLwIjbRzN2utLapvkzfSvlkqM8WpmZWOwT5uDoEjMtYHuhdcNJ+v rFCyisBuhz5sQooaMMh74bJ8o52T0NsaPQDvvhT4rrGngyfCLyv3JrlrC5qJzovfKDBs AFg1u6rpbNZTBSS40uXqfk/iPIr7lv/SiuC0KAUczLpVXkTDE30zlFFYAVnr9WhE2LG1 0Wkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tfnJmYiq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga28si6525297ejc.221.2020.12.19.17.21.12; Sat, 19 Dec 2020 17:21:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tfnJmYiq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbgLTBTq (ORCPT + 99 others); Sat, 19 Dec 2020 20:19:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726898AbgLTBTp (ORCPT ); Sat, 19 Dec 2020 20:19:45 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92EC6C0613CF for ; Sat, 19 Dec 2020 17:19:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nTty+Jb7NFfcXZE4+MmMpQCASKTBw2ev6K5BlwoCsxM=; b=tfnJmYiq7rvKVwzvOGc0xjJ7L7 glDSJWXNHGD8nBPb1x09mxZ6pJeoLDMIs3IMqjvczp136k4RrLHJYwgwKGsMOIDIXYR3Bg3MlTuFM HBj4MZeRtt6KDfjKo84f6m6M0hocmod82cjYGgA4H1it4HxjvhhPLp/qWrNuD+mLfreHozYTFQ3lu kJn4vaoaFcPgp393aaKOlVor+SyK55zEwqY4g6BkAGS90nv8tS3pheNvt8S9tZYF8dv0ffx0/sE3O dYa6jO/fdHkc0MsKOo+2GywcRRt8IrI02CbvyVGhnkrtnA6GYVyQ4+nvI8r27DXqPYcByCthM2M3z Hiz1op4g==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kqnMp-0001Wz-5k; Sun, 20 Dec 2020 01:18:35 +0000 Date: Sun, 20 Dec 2020 01:18:35 +0000 From: Matthew Wilcox To: Vitaly Wool Cc: Mike Galbraith , LKML , linux-mm , Barry Song , Sebastian Andrzej Siewior , Minchan Kim , NitinGupta Subject: Re: [PATCH] zsmalloc: do not use bit_spin_lock Message-ID: <20201220011835.GU15600@casper.infradead.org> References: <18669bd607ae9efbf4e00e36532c7aa167d0fa12.camel@gmx.de> <20201220002228.38697-1-vitaly.wool@konsulko.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201220002228.38697-1-vitaly.wool@konsulko.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 20, 2020 at 02:22:28AM +0200, Vitaly Wool wrote: > zsmalloc takes bit spinlock in its _map() callback and releases it > only in unmap() which is unsafe and leads to zswap complaining > about scheduling in atomic context. > > To fix that and to improve RT properties of zsmalloc, remove that > bit spinlock completely and use a bit flag instead. Isn't this just "I open coded bit spinlock to make the lockdep warnings go away"?