Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751781AbdDCGJB (ORCPT ); Mon, 3 Apr 2017 02:09:01 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36746 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344AbdDCGI7 (ORCPT ); Mon, 3 Apr 2017 02:08:59 -0400 Date: Mon, 3 Apr 2017 15:08:58 +0900 From: Sergey Senozhatsky To: Minchan Kim 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: <20170403060858.GA17309@jagdpanzerIV.localdomain> References: <1491196653-7388-1-git-send-email-minchan@kernel.org> <1491196653-7388-4-git-send-email-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1491196653-7388-4-git-send-email-minchan@kernel.org> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 881 Lines: 29 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 c) spin_locks probably have better fairness guarantees what do you think? can we, in this patch set, also replce bit spin_locks with a normal spin_lock? -ss