From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Andrzej Siewior Subject: Re: [rfc patch] drivers/block/zram: Replace bit spinlocks with rtmutex for -rt Date: Wed, 30 Mar 2016 11:19:39 +0200 Message-ID: <56FB9A2B.3060903@linutronix.de> References: <1458641979.15742.6.camel@gmail.com> <20160330085622.GA21849@linutronix.de> <20160330091302.GB2769@swordfish> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Mike Galbraith , Minchan Kim , Nitin Gupta , RT To: Sergey Senozhatsky Return-path: Received: from www.linutronix.de ([62.245.132.108]:38611 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758752AbcC3JTn (ORCPT ); Wed, 30 Mar 2016 05:19:43 -0400 In-Reply-To: <20160330091302.GB2769@swordfish> Sender: linux-rt-users-owner@vger.kernel.org List-ID: On 03/30/2016 11:13 AM, Sergey Senozhatsky wrote: > On (03/30/16 10:56), Sebastian Andrzej Siewior wrote: > [..] >>> +static inline void zram_unlock_table(struct zram_table_entry *table) >>> +{ >>> + __clear_bit(ZRAM_ACCESS, &table->value); >>> + spin_unlock(&table->lock); >>> +} >> >> ZRAM_ACCESS is the only bit used for locking. ZRAM_ZERO is the only flag >> set / tested. >> Would it be possible to make value u32 and add a spinlock? value is has >> not 64bit on 64bit systems and it uses only the first 23bits for the >> size and bit 24+25 for the two flags we have now. So the size should not >> change on 64bit systems only increase by four byte on 32bit systems. >> That is without the lock debugging of course. >> >> Minchan, Nitin, Sergey do see any reason not to do so? > > that's increased size for every table entry + lock debugging bloat; > not exactly what zram is trying to do. sounds bad enough. That size is _only_ increased with lockdep enabled. So if you that much concerned about size of this struct why not disable lockdep? > > -ss > Sebastian