Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751917AbdDCIHS (ORCPT ); Mon, 3 Apr 2017 04:07:18 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33794 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbdDCIGd (ORCPT ); Mon, 3 Apr 2017 04:06:33 -0400 Date: Mon, 3 Apr 2017 17:06:32 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , 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: <20170403080632.GB17309@jagdpanzerIV.localdomain> References: <1491196653-7388-1-git-send-email-minchan@kernel.org> <1491196653-7388-4-git-send-email-minchan@kernel.org> <20170403060858.GA17309@jagdpanzerIV.localdomain> <20170403063420.GA7713@bbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170403063420.GA7713@bbox> 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: 613 Lines: 21 On (04/03/17 15:34), Minchan Kim wrote: [..] > > 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. mostly agree. I think (and I may be mistaken) direct IO causes contention; but direct IO is probably not a usual zram workload. > > 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. :( hm, good point. -ss