Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp106540imn; Fri, 1 Jul 2022 10:56:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1trsHjOMpntRSDuP5olPebvgFg7IDyBk/xdVujsfeW0O5QVZzsXwwSG6De9X+QN0SwmZnC1 X-Received: by 2002:a17:906:8315:b0:726:38da:f0f with SMTP id j21-20020a170906831500b0072638da0f0fmr15613461ejx.462.1656698179662; Fri, 01 Jul 2022 10:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656698179; cv=none; d=google.com; s=arc-20160816; b=u9MWpdxx+0Q3a0EpLtxZ30jeE0ikRGVKANa35p235357AG6cnG8mYGTHrnH1MJi5qp GtcaLSTxwvbRVVqL2fX6IrDBWePSFWyRybMaJ0lNz4JxD7FLA/OSHauIV0wkKhP0sED+ H26RWVERIaLzwd+O+3cpIpfBFwOuLGrLnV1rywYRuRnQ5jcJgdORvGwuW7dz7212Eyxt Uhvz8swFTudbV+V8T1No/sEFpAo3gyHVYhEWZSoPlo9GxszB8Y3c8ziUDBY8JHJYdWBd KHg4Gmd9ElT4980FmHbeAXqfYxsybVMyyiIIOYhtZG8F2lBln/Rd5bDe2+5wixrFYftt ptXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JKTGayWcHy1CRY5akoOpVqKPvu3lbbkaXvrXRBSaOY8=; b=JeacIhyZ99dnvtjUOZZsBi3gtdmKJoJmaU9NP4f1fOZVv+4YKw16vMvIBa4PyxStSA gcvKDmSx2NLu/I5Z4GxsXC+GobNfnVMuaj8IFUnQ4pawVECa+fiCA2zzouipZosO2Vhb lyvGptb8tDpDStUzunwISREkX2wDm3bsWHgWPWjR1VwZlVGGM0vonUUoJEMcbZNn5LJi 4JorJbeS2r9CrsCnulIQweCIJYIOzUu4i0PYKNy3ez8X/3pYx+nTSn14Sa4q3eNgAl8P 9ZEHhuXQaWppAhF/Y8wj2NtF3OaMQAzHVKCh0jFIYd8jHdFPYyWzFpcZzQSJpkCH/3Om PeNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=D7BeEFa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ej13-20020a056402368d00b0043783a835aasi4160595edb.410.2022.07.01.10.55.50; Fri, 01 Jul 2022 10:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=D7BeEFa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbiGARtO (ORCPT + 99 others); Fri, 1 Jul 2022 13:49:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbiGARtM (ORCPT ); Fri, 1 Jul 2022 13:49:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44E1A38DB1; Fri, 1 Jul 2022 10:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JKTGayWcHy1CRY5akoOpVqKPvu3lbbkaXvrXRBSaOY8=; b=D7BeEFa01MXEbrmVsMP7njCwS7 vwZubJZnPr6xb2EL/94sSz+dg0Cnhchm0ZVNk0uAJq6thBRmQ8IwCtIDhMqtNxaqG4zdExk9+6m4a 4GWXpfQ3s7CEce69EdP3XXG5wwFFYiBlMEUNKXnW14z37a3Am5JrfoFv7TPAxOeU7fi9UiDna906g MxRG02tAKoYAdGEKnRd068+G0a8EPLYdY4b5m6s0mXyT55RYgxvSeOWpXfRO72P3hAf7SxuCVceFI R8sdiKrcMfBUcXau93UyeC2kSRy/kqMLiIdB0jUc5A/rHAMpZShtXV3Pu362d1mm0aSPPHQo0lW1V qJK09ulA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7KlS-006HP9-8e; Fri, 01 Jul 2022 17:49:10 +0000 Date: Fri, 1 Jul 2022 10:49:10 -0700 From: Luis Chamberlain To: Lucas De Marchi Cc: linux-modules , lkml Subject: Re: [ANNOUNCE] kmod 30 Message-ID: References: <20220630153621.3fggpqrbyvunhwfu@ldmartin-desk2> <20220630223323.2hko2imx62embtsj@ldmartin-desk2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220630223323.2hko2imx62embtsj@ldmartin-desk2> Sender: Luis Chamberlain X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2022 at 03:33:23PM -0700, Lucas De Marchi wrote: > On Thu, Jun 30, 2022 at 03:09:32PM -0700, Luis Chamberlain wrote: > > Sorry for the super late review, I was swamped. OK so the only issue > > I can think of is that rmmod *used* to support the kernel wait support > > with $(rmmod --wait) so wouldn't this be odd? > > any reason not to use modprobe -r? I was referring to old scripts which may have used $(rmmod --wait) before. But since support for that was ripped, then yeah I can see that should not be an issue. However I can think of *one* issue, did we ever support `modprobe--wait`? Because the way fstests / blktests would implement this feature detection is with something like this now: _has_modprobe_patient() { modprobe --help >& /dev/null || return 1 modprobe --help | grep -q -1 "remove-patiently" || return 1 return 0 } > > It is why I had gone with: > > > > -p | --remove-patiently patiently removes the module > > -t | --timeout timeout in ms to remove the module > > > > You would know better though. > > > > Also just curious, is it really terrible to just support waiting > > forever? > > is there a use case for that? If we are trying to cover some races, I > imagine a small timeout would be sufficient. Also notice that if the > timeout is too big, so will be the interval between the retries. On > your v2 I had suggested polling the refcnt so we would get notificed > on changes, but as you also noticed, that didn't work very well. So I > went back to a time-based retry solution. > > if there is a use-case, should we cap the interval between retries? I really can't think of a use case except for catching glaring unexpected bugs in test suites where the kernel developer would really like to know something really bad happened, but even then a timeout is likely desirable. So just a heads up the timeout I'll use for fstests / blktests will be of 100 seconds. Thanks for this work! Luis