Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1726394pxb; Fri, 25 Mar 2022 04:34:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk42Lm/R9/Fn+b6OoZ5v8BceG8Ylr3JI5zJCp1sADuJpAEfn5Fna6gIX5ZYRpGfN554FZ5 X-Received: by 2002:a17:907:7849:b0:6d5:87bd:5602 with SMTP id lb9-20020a170907784900b006d587bd5602mr11039698ejc.349.1648208096629; Fri, 25 Mar 2022 04:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648208096; cv=none; d=google.com; s=arc-20160816; b=YbZF1Zfx9S01I6re6vZS27iJIfHzyTZiDc1++7xw7yy+gzllxMiSqaokQD+rDPDA5w Nm9CsbYJ5YbcAbiBcYFcwFEX6KXqeOSYyFHL9X2kws0kajf96SNebpVrljStMSKZgxKD aNj3wmCWHWD1loRI72AT3+E2E2qwerCDy3KI9tukUhStWw8UHuWtK+gL3wglHb2umh7+ MXURZX+qEe+FrE9TUffWId/KGmnBmntgl2KWruRc08IEmoAwvYGHOYmuIoFHAM5jaxap V1oLsCfTbPG0GvG0HpI61mKU4fbHJQCiZepI//zVbsFcZQe5Ikq0V+mhfG+f8Bzky3zS +PAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id :dkim-signature; bh=NRpEnyOqsaUwAs5DucD1b5ETOzwDBz4Ik403KU7/bNY=; b=mD5WeVfdGrD4JNMRYo/uzn0dEdw736DNqvHXJExvDRdHjQM/suNP3CBgASwH/Yrpbm iCCQKH8h+oh/1GOv0N66NngnzcRa5yOUBo62LgdyDfHe/fUw7DSTheYuMMWdKoLsJXv8 dlOuzk+E9x8ujoFpY0xdB4GKfZGwC/RFt/hVi8n83pGwf/I4NyOMVPAZB4YPy6jqMNSy CV6/VFo+VyPLJ+orleP7++5XQaaSz/Et2RZW6+DAso5yv0fgygmeqJ21ADIi/fJdgVi4 VlbSbKIDGgpeGzw1UTa4IRr6TLZvND9SR2oo8iyjIPDHmBcNe/UqJewru98/Bri1O5+w za7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="Q/taKYtf"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020aa7c906000000b00418c2b5bee7si2307480edt.457.2022.03.25.04.34.29; Fri, 25 Mar 2022 04:34:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@sipsolutions.net header.s=mail header.b="Q/taKYtf"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344569AbiCWUPZ (ORCPT + 70 others); Wed, 23 Mar 2022 16:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344568AbiCWUPY (ORCPT ); Wed, 23 Mar 2022 16:15:24 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 100787655 for ; Wed, 23 Mar 2022 13:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=NRpEnyOqsaUwAs5DucD1b5ETOzwDBz4Ik403KU7/bNY=; t=1648066434; x=1649276034; b=Q/taKYtf8wQaoqFmT02xFDJ32iRHMFANOQfE1aNdAosRXH5 VEFPo217HL3xeQl2r8DNXw/dDNOYCS8dtb5RbZAu/xxJfDmtS1sEA0LPMAnjofvyWJMnK4+436Llj z1EOqcaLRpt+EPhWf0BuS5xLQDMUum9Bhue7Rb7Y6ycAhKs0eniMvQBUfGCUX3coTmx1qEfqUFeqW Sd/h0ffGCsDBUPlqbXK81vLkLNKy7p0lQWchOGgtrSHVWFd9OWRUqqhf/3xs3TuiRt4mlEaw6MyAP Cr+UG6jZDujO/dHi+7C2D0Xl5FqU125w/aIxD/pBGeDEr1/DLeRHrYxP1F4KD2RQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nX7Md-00HDUA-Co; Wed, 23 Mar 2022 21:13:51 +0100 Message-ID: <9e3f1db524321ac33a4aa79341e4e8165eb99189.camel@sipsolutions.net> Subject: Re: poor beacon/scan reliability with mac80211_hwsim From: Johannes Berg To: James Prestwood , "linux-wireless@vger.kernel.org" Date: Wed, 23 Mar 2022 21:13:50 +0100 In-Reply-To: <545f0fb3be911c4bed6a0dc81b0679a9824fe6c9.camel@gmail.com> References: <928be46d97a3da3fd677c9d87f9be6a02f4d3277.camel@gmail.com> <545f0fb3be911c4bed6a0dc81b0679a9824fe6c9.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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-wireless@vger.kernel.org On Wed, 2022-03-23 at 12:45 -0700, James Prestwood wrote: > > Though I'm surprised the overhead and all is enough to make the jump > > out > > to userspace and back take 30+ milliseconds (which is the smallest > > possible dwell time if you have hwsim hw-scan enabled, otherwise it's > > slightly larger). > > Yeah I'm surprised as well. I haven't _proven_ this is the case but its > really all I can think of for why scan results are missing.  Agree. > I don't > think hw-scan is being used, we don't set ATTR_USE_SCANCTX or > ATTR_CHANNELS so I guess this is the best case scenario for dwell time, > hmm. Well in mac80211 it's HZ/33, which is about the same time. > > Though if you can run tests under UML/time-travel that would get rid > > of this problem ;-) > > Yeah this has been in the back of my mind for a while since it could > also speed stuff not having to wait for timeouts. True. > But with respect to this issue how could UML fix it? Pause time to > allow the scheduler to catch up? Well I should have said time-travel=inf-cpu, which is really the mode I'd use for testing (and we have time-travel=ext of course for use with multiple VMs). In this case it simulates infinite CPU speed! Thus time only passes if it passes *explicitly*. So a timeout of 30ms will only fire after something else has slept 30ms, or nothing is actually doing anything at all of course. The amount of time it takes the CPU to do the jump out to userspace/wmediumd, come back, copy the frame, etc. is all completely irrelevant in this case. It's just "sleep 30ms" and all the necessary CPU expenditure is not accounted at all. johannes