Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751458AbdDCGeY (ORCPT ); Mon, 3 Apr 2017 02:34:24 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:37668 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbdDCGeX (ORCPT ); Mon, 3 Apr 2017 02:34:23 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Mon, 3 Apr 2017 15:34:20 +0900 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , linux-kernel@vger.kernel.org, Sergey Senozhatsky , kernel-team@lge.com Subject: Re: [PATCH 3/5] zram: use zram_slot_lock instead of raw bit_spin_lock op Message-ID: <20170403063420.GA7713@bbox> References: <1491196653-7388-1-git-send-email-minchan@kernel.org> <1491196653-7388-4-git-send-email-minchan@kernel.org> <20170403060858.GA17309@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170403060858.GA17309@jagdpanzerIV.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1279 Lines: 40 Hi Sergey, On Mon, Apr 03, 2017 at 03:08:58PM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (04/03/17 14:17), Minchan Kim wrote: > > With this clean-up phase, I want to use zram's wrapper function > > to lock table access which is more consistent with other zram's > > functions. > > which reminds me of... > > there was a discussion a long time ago, -rt people absolutely > hate bit spin_locks and they suggested us to replace it with > normal spin_locks (and I promised to take a look at it, but > got interrupted and never really returned back to it). > > for !lockdep builds the impact is somewhat small; for lockdep > builds we increase the memory usage, but > > a) lockdep builds are debug builds by definition, no one runs lockdep > enabled kernels in production > > b) we have lockdep in zram now, which is nice It's really one I want to have. > > c) spin_locks probably have better fairness guarantees In fact, it wouldn't be an imporant because zram's slot lock contention is not heavy. > > > what do you think? can we, in this patch set, also replce bit > spin_locks with a normal spin_lock? With changing only zram side from bit_spin_lock to spin_lock, it would be crippled. I mean zsmalloc should be changed, too and it's really hard. :(