Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2935632imm; Thu, 24 May 2018 19:24:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrTZvqfkuPHBvempuTMihLTea3x+1GrUfmEnZ5ot3YsHSqWVmPPb22EOihY7SGvQ4rWMvNf X-Received: by 2002:a62:d97:: with SMTP id 23-v6mr518642pfn.231.1527215049398; Thu, 24 May 2018 19:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215049; cv=none; d=google.com; s=arc-20160816; b=XTzWz8GS3vTC97QXiEoBlOVvl37iivjdEg/2yKMX4jEqp7HbjLWLbTtOihpzH7P0Wp xvZWAKp8jkV9GPzkIKS7g8OvR4xRosEEMIZbl4PHudpVB5p4sr/oGz2SdqC/NE1PtXbP Jy6S5ZWkd8CVROgPQ+qXCGERxD3N88JEvfg97quFoY2C9gqjlpBYz8G3p3Y1H3Lx5kv6 OkZhoa1pgmYS4lAV7guvIHDexpQQmy3+TwoH7hup8cKRMzpKjhA+DJRtwROuto4pu55V AsMqMZHzo7FjW+c2q9pNy+Ee4hv26wah6LrR50T0epVC8JvsohBd2avN6oDowtwG6qIo PSaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=1p+y/UWO/ujcEVg/AnL9/ye/oGKNoclGkgzrCaDLZvs=; b=J1oLvR7I5U1i20QNVkCdZLW7nQ486CAIWRSz4kLc0pXOO/O9DbMuHYQ3WIqx0sqYNO 4h/B5hI0DiwGTsu8I4V1yWyMBZliQGmFeAVXBcvMUtm0re4BkoxiRefg8O/fsAcfAAa5 89VPk1MCiydyKoyU8DxieScrAzYBJanhkz7vxz4OfZI6xOczurJMJrBmc3BKF1r9BAk+ nQL33kA4XiNtRZidnS55IMqT6fVAGg5hNrsDu7xVmrZK9mrdWTjTBp7IVl+rf0FlOMK7 9ws4r8JpW9yyA47KMVRJhdHzenqxvRaryAtMTe3WkHT1UjT51+Q7k85/rM7tWvr3rz7p ImEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bobcopeland-com.20150623.gappssmtp.com header.s=20150623 header.b=roTBPvWB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b96-v6si22925974pli.172.2018.05.24.19.23.54; Thu, 24 May 2018 19:24:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@bobcopeland-com.20150623.gappssmtp.com header.s=20150623 header.b=roTBPvWB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968255AbeEXPuj (ORCPT + 99 others); Thu, 24 May 2018 11:50:39 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:36028 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967622AbeEXPug (ORCPT ); Thu, 24 May 2018 11:50:36 -0400 Received: by mail-it0-f66.google.com with SMTP id e20-v6so2994994itc.1 for ; Thu, 24 May 2018 08:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bobcopeland-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1p+y/UWO/ujcEVg/AnL9/ye/oGKNoclGkgzrCaDLZvs=; b=roTBPvWBnR7zieIjvpWES4yswaIB2F52vaz9RjtrdoJ66XNlx+dEVuL5QFnXlLQmMO m8GxRKbpRl5JBmTwQrjHthUkjENR3mBz+ON3NgUXdQngly7lu8KSZ5yIEaRjqGt18+1H Sx1ImCn4mlTztuxuKBpbXEk9gpsGtugWZK0zd2cKBc4NnngoThBuknXQuluaJ36HGErt 9ITRvMTX7SOtmwfn0H3+7cxN06ay3mZ1/sgkcYxNYF5QSXfXGSRg9DkqNgzL+pRNvMfD g9mihYhdFJaB+QTrQfELUI5rMXxnGneVAIctJ1bsdhnsHOCqDKk0FlezBXwJm/Gwp1Qx Xcnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1p+y/UWO/ujcEVg/AnL9/ye/oGKNoclGkgzrCaDLZvs=; b=YdonHyYZwoANzixk3ZbJSQ7DFTJQ0PcbBwnShKv9mkzv+2egXlKro9KbtORz/t1VDi 7mp195jrvWeKJe8U7/eXwA0b1ixwZG8uP8Se1oE16GgrkfIVQmcgC7ki/VMrpgKQhgpf 0masL6Y7/26LcDW1QjrYtyKaPhn/rOtvGedRqhZtq50J3jsLLHex/38QehlKEzvRW1o1 R2x+EdICOpHrfZkcNER6CTdjazyBIYnR9Q4oe4iKhzIlVUo4DuodrgWK/gR+4JuxbZgI MWRHVrPn0sqcCX3L6SftR5xgooczBypxbeEWxrhOzP9ZMgd2sY83ll3bth3+rosTNW8f Q24A== X-Gm-Message-State: ALKqPwfGwzQE3k9LeBnVNLx/JyWg4Uh67jrh+vKk7SQee1xyuyMDfHOJ 2ydv2K/r82GOf39eCgBYyHJC0w== X-Received: by 2002:a24:68c6:: with SMTP id v189-v6mr10168839itb.61.1527177036064; Thu, 24 May 2018 08:50:36 -0700 (PDT) Received: from hash (CPE30b5c2fb365b-CM18593342f28f.cpe.net.cable.rogers.com. [99.232.51.173]) by smtp.gmail.com with ESMTPSA id 72-v6sm1470067ioe.86.2018.05.24.08.50.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 May 2018 08:50:35 -0700 (PDT) Received: from bob by hash with local (Exim 4.89) (envelope-from ) id 1fLsVe-0003z3-8F; Thu, 24 May 2018 11:50:34 -0400 Date: Thu, 24 May 2018 11:50:34 -0400 From: Bob Copeland To: Niklas Cassel Cc: Adrian Chadd , Kalle Valo , David Miller , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] ath10k: transmit queued frames after waking queues Message-ID: <20180524155034.xse7cfm5figfktuj@localhost> References: <20180517231512.13085-1-niklas.cassel@linaro.org> <20180521203701.GA7619@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180521203701.GA7619@localhost.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 21, 2018 at 10:37:01PM +0200, Niklas Cassel wrote: > On Thu, May 17, 2018 at 03:26:25PM -0700, Adrian Chadd wrote: > > On Thu, 17 May 2018 at 16:16, Niklas Cassel > > wrote: > > > > > diff --git a/drivers/net/wireless/ath/ath10k/txrx.c > > b/drivers/net/wireless/ath/ath10k/txrx.c > > > index cda164f6e9f6..1d3b2d2c3fee 100644 > > > --- a/drivers/net/wireless/ath/ath10k/txrx.c > > > +++ b/drivers/net/wireless/ath/ath10k/txrx.c > > > @@ -95,6 +95,9 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt, > > > wake_up(&htt->empty_tx_wq); > > > spin_unlock_bh(&htt->tx_lock); > > > > > + if (htt->num_pending_tx <= 3 && !list_empty(&ar->txqs)) > > > + ath10k_mac_tx_push_pending(ar); > > > + > > > > Just sanity checking - what's protecting htt->num_pending_tx? or is it > > serialised some other way? [...] > I can't see that any of the examples applies, but let's add READ_ONCE(), > to make sure that the compiler doesn't try to optimize this. Couldn't you just move the num_pending_tx read inside tx_lock which is 2 lines above? I think all the other manipulations are protected by tx_lock. -- Bob Copeland %% https://bobcopeland.com/