Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp178351ybx; Fri, 1 Nov 2019 01:31:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpYxbmMZQP5WTs0BkQyAdkmCBKJQww7pjG1ZOmk845D/n3EihyP7WPuRppf3p/3vSEHMS9 X-Received: by 2002:a17:906:edd7:: with SMTP id sb23mr8480968ejb.168.1572597118574; Fri, 01 Nov 2019 01:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572597118; cv=none; d=google.com; s=arc-20160816; b=TB1Bcce16A5s01zuyKWIWfoKzOUAB9ckMrP3IocZC4aJdwrUObXYfQ43UBOVLR2z9O Eus7RZIfImUssbehpYpadNdvpoECbpCD4IvWQP9Z5rMHpQji6asXE35zTilnPyLg37Bu nj5snHPsqfkpGcyDXydnUbjaEksA+cIY1YG8D/BbQK1xQB6y/xN1BdZPyCwDvZI+vn0Z JA2vkZkLdqNm0voIFOerUfymMhbjEgKmTnSuI9I/4E3JyixYtLAh0RloKVzlAn129Mz7 Jwa0toJVeXf/tMk025uWIGDiLUdIOp89oYVFnMcIZ1+kgDJ6MhqTBcRygGh3hJ2/dfTc 0URA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=+cvjuN1W6/VWr/N0q71I7Bv4ynt0+XYXj6lXuqamZ2g=; b=zWsC1n4df4XJcS+29fOiN7ktKbSxDrsu6Mi1uq/twObtR8+6t2e8BIEneoDxiM5KRT /VnSUU41bwvavv61dGWJ1mx3WPHOi9Kvf8VJnYEyFOh7YRkMDAYzXmtFCHlcjcCSyC3q 8+e21eIifTEp5Q3iAHnc7+/PC1pKPnKifZ0X4td1gDVe3KQ29+T/Hcux0YsbFdzWpHE2 C74rzbgJMdW1RktMKwToMlO9Zlv5rsSaueZmQc/SNB+BfvZ2qvs1ZpPPRW8wCyKjL0P4 Smni7qlgDthgBU6L/CKkN9RE2E0E4YD8+5vD1KKeITpoKvgov3FsvU2oMPmPCyRCO56E il4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="X/eRvxpJ"; dkim=pass header.i=@codeaurora.org header.s=default header.b=dGeyYvJ2; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si6310933ede.121.2019.11.01.01.31.21; Fri, 01 Nov 2019 01:31:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="X/eRvxpJ"; dkim=pass header.i=@codeaurora.org header.s=default header.b=dGeyYvJ2; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730258AbfKAIbE (ORCPT + 99 others); Fri, 1 Nov 2019 04:31:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57020 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730178AbfKAIbD (ORCPT ); Fri, 1 Nov 2019 04:31:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8B70B60A96; Fri, 1 Nov 2019 08:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1572597062; bh=ams945pLxCO9gEGCVF/wRln1a+5KrlGC+3FRBJlFWX0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=X/eRvxpJux1xr1fgNclInEmnWEKYVViQU3GppFN9vVjbJutX9x7CeJTlstcBDteZp GsykKgbV1Go91Oji9AblJFxrL38uh48hh+76nO3eVFy/zfs2Sq9bmW1oKmQdTLxxew zDXpOMk9jA0CeHvpa/vfYFlNI0/3t6O3Ix/u95C0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from x230.qca.qualcomm.com (176-93-46-192.bb.dnainternet.fi [176.93.46.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E9E866049C; Fri, 1 Nov 2019 08:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1572597061; bh=ams945pLxCO9gEGCVF/wRln1a+5KrlGC+3FRBJlFWX0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=dGeyYvJ2f+KHJmro82HBaekytQXJ8q0t9tivF+QBxrUau08D4/fycMD0P7hXWswq9 H8uDgbvDNcKlTjXj5NYYtDDx0X80OPUx1BQYz99CzNUw6SKNrLufgQiu+mjjgB94oW pFy6ImUMplUm0+cEgP59mq9z4JggtuWGmb90x4NU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E9E866049C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Tony Chuang Cc: "linux-wireless\@vger.kernel.org" , "briannorris\@chromium.org" , "g.schlmm\@googlemail.com" Subject: Re: [PATCH 3/6] rtw88: use a module parameter to control LPS enter References: <20191025093345.22643-4-yhchuang@realtek.com> <20191031075911.3CCB86079C@smtp.codeaurora.org> Date: Fri, 01 Nov 2019 10:30:57 +0200 In-Reply-To: (Tony Chuang's message of "Thu, 31 Oct 2019 08:17:37 +0000") Message-ID: <87imo40zi6.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Tony Chuang writes: > From: Kalle Valo >> wrote: >> >> > From: Yan-Hsuan Chuang >> > >> > If the number of packets is less than the LPS threshold, driver >> > can then enter LPS mode. >> > And driver used to take RTW_LPS_THRESHOLD as the threshold. As >> > the macro can not be changed after compiled, use a parameter >> > instead. >> > >> > The larger of the threshold, the more traffic required to leave >> > power save mode, responsive time could be longer, but also the >> > power consumption could be lower. >> > >> > Signed-off-by: Yan-Hsuan Chuang >> > Reviewed-by: Chris Chiu >> >> I don't think a module parameter should be used to control power save >> level, instead there should be a generic interface for that. Also the commit >> log does not give any explanation why this needs to be a module parameter. >> >> Tony, there's a high barrier for adding new module parameters. It's a >> common >> phrase for me to say "module parameters are not windows .ini files". And to >> make it >> easier for everyone always submit controversial patches separately, do not >> hide >> within a bigger patchset. >> > > Alright, I was thinking module parameters as a convenient tool for driver to > control the behavior for debugging or out-of-band adjusting. But it seems like > you treat it more carefully. > > Actually this is just going to allow us to set different default values for different > use cases. So is there a better way to control it. Or I should just change the > value to a better one. By our experience, set this to 50 is a more reasonable > value, such that some web surfing or background traffic wouldn't make the > driver to leave PS mode. I recall having a similar discussion something like 10 years ago. (Yes, I have been here for way too long). I think at the time recommendation was to use latency value from the QoS framework to make it possible for user space to change wireless power save aggressiveness. But I don't know if anyone really used that. I was feeling nostalgic and decided to find some pointers: https://lore.kernel.org/linux-wireless/1271850458-32437-2-git-send-email-juuso.oikarinen@nokia.com/ And it seems the patch was even applied: 195e294d21e8 mac80211: Determine dynamic PS timeout based on ps-qos network latency This is for mac80211 dynamic ps feature, but I imagine we could somehow extend it to driver settings like the LPS threshold here. Something like this would be much more acceptable than having custom module parameters for each driver. -- Kalle Valo