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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EC88C4361B for ; Sun, 20 Dec 2020 01:20:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48F4E2395C for ; Sun, 20 Dec 2020 01:20:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727005AbgLTBTq (ORCPT ); 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"?