From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753565AbbCEBR5 (ORCPT ); Wed, 4 Mar 2015 20:17:57 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:42533 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533AbbCEBRz (ORCPT ); Wed, 4 Mar 2015 20:17:55 -0500 Date: Thu, 5 Mar 2015 10:17:48 +0900 From: Minchan Kim To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, Jerome Marchand Subject: Re: [PATCH 0/2] make automatic device_id generation possible Message-ID: <20150305011748.GD2592@blaptop> References: <1425478601-19141-1-git-send-email-sergey.senozhatsky@gmail.com> <20150305001954.GA9563@blaptop> <20150305005829.GC14927@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150305005829.GC14927@swordfish> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 05, 2015 at 09:58:29AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (03/05/15 09:20), Minchan Kim wrote: > > I'm not against but I want to know why we should support > > user-defined device id. What usecase do you have in mind? > > > > hm, you never know what people can come up with. that's probably the > strongest support argument I can provide. I wish there was something > like - my friend Mike has a "device /dev/zram1 is always swap device, > device /dev/zram$(id -u) is a per-user zram device (he finds it useful, > because just looking at device id he can easily tell who owns that > device)" policy. but nothing like that. I just think that it can be > useful. no real use cases (well, partly because we don't support device > add/remove). > > /* yet "/dev/zram$(id -u)" thing looks interesting */ Fair enough. > > > user defined id support comes at a price of ~10 lines of code, or even > less. we waste much more code to show ->stats, and not all of them are > of any real use, to be fair. that just said, that dropping user defined > id is not a great deal. ok, let's see if we can come up with anything by > the end of this day and I'll send out a removal patch if nothing pop up. As I told you, I'm never against. I just want to know usecase. If we don't support it from the beginnig, someday, someone will complain and we can catch up the usecase and support it easily with adding 10 line code. This dyanmic add/revmove feature proves the idea. :) Main reason I finally decided dynamic device management feature was someone complained he should do rmmod/insmod zram.ko to increase the number of zram device in runtime but one of zram device was used for swap, which was hard to swapoff due to small memory so there was no way to increase the number of zram device. It appeals a lot to support dynamic zram creating and finally I catch up the usecase. ;-) > > -ss > > > Could we support automatic id support only at this moment? > > Then, if some user complains about that in future, we could turn > > on user-defined device id easily and we could know the usecase. > -- Kind regards, Minchan Kim