Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754125AbbFEC6T (ORCPT ); Thu, 4 Jun 2015 22:58:19 -0400 Received: from ozlabs.org ([103.22.144.67]:41149 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754061AbbFEC6Q (ORCPT ); Thu, 4 Jun 2015 22:58:16 -0400 From: Rusty Russell To: Dan Streetman Cc: Jani Nikula , Greg Kroah-Hartman , "David S. Miller" , Christoph Hellwig , Andrew Morton , linux-kernel@vger.kernel.org, Dan Streetman Subject: Re: [RFC] module: add per-module params lock In-Reply-To: <1433422379-24418-1-git-send-email-ddstreet@ieee.org> References: <1433422379-24418-1-git-send-email-ddstreet@ieee.org> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 05 Jun 2015 10:12:36 +0930 Message-ID: <87mw0ft283.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1048 Lines: 25 Dan Streetman writes: > I sent this as part of a patch series a few days ago, which I was asked to > break up, so I'm sending only this patch as a RFC now, until I work out > the details of the zswap patch that needs this. I'd like to get comments > on this early, since it changes the way module param locking is done. OK, it's not insane, but I'm not entirely convinced. 1) The difference between blocking sysfs for read vs write is mainly documentation. In theory, it allows a rwsem, though in practice it's not been a bottleneck to now. 2) Implicit is bad: implying the module rather than the parameter is weird, and skips the BUG_ON() check which was there before. And finally, why are you loading a module from a param callback? That's a first! Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/