Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1393970ybn; Wed, 25 Sep 2019 17:41:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIJII69WxRW2iHMXDgR9OIV9E4hsMr9UZLRMinINbdfO3SBveUcFRIzl7kvnMZQx0Tt+0M X-Received: by 2002:a17:906:4554:: with SMTP id s20mr803118ejq.257.1569458467055; Wed, 25 Sep 2019 17:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458467; cv=none; d=google.com; s=arc-20160816; b=0GmI6I4i2h/r2Wxw5CYcH+wi3FEB4WHkcLcRSzy8HmBbAX5tdcnGjfYdtpN02MQI0z hP7fp+bzvgp8OaosDk4laSnh/MBfzRLL9DX9WqJj/A0PTB4wGb69D+wvqUfhmb5wLqzf xGcDqw6LOFIoaSThtYc9jqD6hTySFWY80SR9vTeunFhsG6IG4QBIzjDHPwN9TpY6sZQc 8yeiXkyeilt0JTX5XvDM6DY4YGNM0ntsPAN3Cm78Gy5YJv3whRQdTcN3PPxUv6ecLf/6 9r/fsazPn8uvGTIvmulrHjADv6A1UWuQ7wN5IYegAitp5pYXT/UiI4u91X54U00/SDTz lv0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=7WfQtY8woYQQJxi3Us8WkUhtwh28XfPXxWBXNXZaVQI=; b=QOW4oRv4/6zpY08Rfhvk1ALqyVfHvf/etRrEhScTuxKSvzrs3refg4T6/BRUN46X/y GbX8ZREOO6k0bM0VL3/wXI04OYkCR3WL8iDVEw7lusULYbq+R7O0j9qcrO8ws/9Ienbq KDp2Ay33Zp8ZEOvpR/ecyEQfKP9pbHg1F200zt2OPa7d7aeqIPnOBSmF8U1vyB5Gfvoj hKzPFkffh2Fq+G1T3JjvuORv7PkeAJ0jThlnZCKF6hiGsVlnIRig2h4pimbJIMpuq46u gRzlmQsppTQS8scCDlqxYbPcgepfP4j4O7flSTFIz/vMwfGpLRuG9RSj1x4MeCG0BZmg 0ReA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OQjHsUf5; dkim=pass header.i=@codeaurora.org header.s=default header.b=FR18QJsP; 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 j52si409601eda.338.2019.09.25.17.40.42; Wed, 25 Sep 2019 17:41:07 -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=OQjHsUf5; dkim=pass header.i=@codeaurora.org header.s=default header.b=FR18QJsP; 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 S2394478AbfIXCpl (ORCPT + 99 others); Mon, 23 Sep 2019 22:45:41 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35856 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728992AbfIXCpk (ORCPT ); Mon, 23 Sep 2019 22:45:40 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 119D36083C; Tue, 24 Sep 2019 02:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569293140; bh=iTfu/83qFIlqNFUe+RnkDzMhW8LE4h055QqEN0+Skbk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OQjHsUf55iWzQv26OdqHCcQ3jMkUrMxrJesgnYgO3Zk845r+bxudi44lPcGRK+0x7 gUBCloTe0ZzfI8lMm03XuLQWf19vcCd9bkjXFd8TWahMSkdzmBp9GvK1AxPTuN+JfJ cQizZaH/cGWwcwXYipBoqrVbTiO3e8wUSynYqVTA= 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 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 5533D602B8; Tue, 24 Sep 2019 02:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569293139; bh=iTfu/83qFIlqNFUe+RnkDzMhW8LE4h055QqEN0+Skbk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FR18QJsPlDJ1f5fpR5tRiTKc+RzV1EeD3Z3/ybJNLlFeeAfypUiNlCJvXTk+NWnpc McfYMkpMfYLaXreTm/PjXDO+Pjqpqp/vqHn+dM3e8c7r81LFTbhfly3AcyjT/Au1C6 2maU7xqoa+9VrUBSKQNF5ln81FIxfymrjcQIDRtY= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 24 Sep 2019 10:45:39 +0800 From: Yibo Zhao To: =?UTF-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-wireless-owner@vger.kernel.org Subject: Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree In-Reply-To: <87lfuf5ly2.fsf@toke.dk> References: <1568639388-27291-1-git-send-email-yiboz@codeaurora.org> <1568639388-27291-2-git-send-email-yiboz@codeaurora.org> <87pnjyiq7o.fsf@toke.dk> <87sgothmpy.fsf@toke.dk> <8cdece5c030fd95817fb099021c38613@codeaurora.org> <87tv98fu6l.fsf@toke.dk> <1b4ab006d9b5c88035845aaac193ef48@codeaurora.org> <8736gre3bm.fsf@toke.dk> <198124204167325252fcfcd65e3f2733@codeaurora.org> <87ftkp7uuz.fsf@toke.dk> <4574cce4079f8dab2b2bf223431a6eae@codeaurora.org> <877e617qg2.fsf@toke.dk> <910d9bb5f9016b29fb2aaeb0b89bac38@codeaurora.org> <874l157nrt.fsf@toke.dk> <2935b00bf3e29ad8b2738fe98dc24a76@codeaurora.org> <87lfuf5ly2.fsf@toke.dk> Message-ID: <1b3eab1f2481e0102b284f133605c6c4@codeaurora.org> X-Sender: yiboz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2019-09-23 18:47, Toke Høiland-Jørgensen wrote: > Yibo Zhao writes: >>> So, instead we need to keep next_txq() the way it is, and just add >> >> Right, should keep next_txq() the way it is. >> >>> >>> local->schedule_pos[ac] = rb_prev(node); >>> >>> whenever we remove a node (both in return_txq() and resort_txq()). >> >> Agree, and also we may need to consider case like A is removed and >> soon >> be added back just the same as ii), >> B->C->A->D->E >> then B is schedule, removed and soon added back, >> C->A->B->D->E >> A and B will have a second chance to be scheduled and this may happen >> to >> others as well leading to the infinite loop as you have mentioned >> previously, so do we need to maintain a schedule_round like we do in >> DRR? Like, >> - If the node is in the same round, by pass schedule, go to >> rb_next(), either continue loop this round or end this round. >> - Increase the schedule_round at the schedule_start() only when >> the >> schedule_pos is NULL. > > Hmm, yeah, I guess we could end up with a loop like that as well. > Keeping the schedule_round would be a way to fix it, but I'm not sure > we > should just skip that station; maybe we should just end the round > instead? I am not sure. I believe, in some cases, the rest of the nodes which could be most of the nodes in the tree will not have the chance to be scheduled in this round. > >>>>> We'd still need a check in resort_txq() then, but it would make it >>>>> safe >>>>> to unschedule in return_txq()... >>>> Yes, agree with that. >>>> -- Yibo