From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM Date: Tue, 9 Sep 2014 11:39:43 +0900 Message-ID: <20140909023943.GH11706@mtj.dyndns.org> References: <20140905224047.GC15723@mtj.dyndns.org> <20140909011059.GB11706@mtj.dyndns.org> <20140909012227.GE11706@mtj.dyndns.org> <20140909012933.GF11706@mtj.dyndns.org> <20140909014754.GG11706@mtj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Lennart Poettering , Kay Sievers , Dmitry Torokhov , Greg Kroah-Hartman , Wu Zhangjin , Takashi Iwai , Arjan van de Ven , "linux-kernel@vger.kernel.org" , Oleg Nesterov , hare@suse.com, Andrew Morton , Tetsuo Handa , Joseph Salisbury , Benjamin Poirier , Santosh Rastapur , One Thousand Gnomes , Tim Gardner , Pierre Fersing , Nagalakshmi Nandigama , Praveen Krishnamoorthy , Sreekanth Redd To: "Luis R. Rodriguez" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Hello, On Mon, Sep 08, 2014 at 07:28:58PM -0700, Luis R. Rodriguez wrote: > > Given that the behvaior change is from driver core and that device > > probing can happen post-loading anyway, > > Ah but lets not forget Dmitry's requirement which is for in-kernel > drivers. We'd need to deal with both built-in and modules. Dmitry's > case is completely orthogonal to the systemd issue and is just needed > to help not stall boot but I see no reason to blend these two issues > into one requirement together. Maybe we can piggy back the two on the same mechanism but as you said the two issues are orthogonal. Let's keep it that way for now. We need them separate anyway for backports. > In terms of approach we would still need to decide on a path for how > to do asynch probing for both in-kernel drivers and modules, do we > want async_schedule(), or queue_work()? If async_schedule() do we want > to use a new domain or a new one shared for all drivers? Priority on I don't think async_schedule() is the right mechanism for this use case as the mechanism is inherently opportunistic. It also gets tangled up with async synchronization at the end of module loading. > the schedular was one of my other concerns which we'd need to make > right to match existing load on drivers through finit_module() and > synchronous probe. Why do we care about the priority of probing tasks? Does that actually make any meaningful difference? If so, how? > > Userland could backport a fix to set the sysctl. Given that we need > > both synchrnous and asynchronous behaviors, it's unlikely that we can > > come up with a solution which doesn't need cooperation from userland. > > True and then the timeout would also have to be skipped for device > drivers that have the sync_probe flag set, so I guess we'd need to I'm not sure about skipping for sync_probe flag. That seems like an implementation detail to me. Sure, we do that now because we don't have a better way of figuring out whether request_module() is waiting for it or not but hopefully we'd be able to in the future. I think we just should make exceptions sensible so that it works fine in practice for now (and I don't think that'd be too hard). So, the only cooperation necessary from userland would be just saying "I don't wanna wait for device probing on module load." Thanks. -- tejun