Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7598814pxb; Thu, 18 Feb 2021 14:43:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyloQL0d3r5/kIkKqdmSy/q2vcaDmafGZ62AadMKcFl+CW1C3jYBKFjyE3LjBwe/m0F0G6M X-Received: by 2002:a17:906:28cc:: with SMTP id p12mr6288571ejd.426.1613688184804; Thu, 18 Feb 2021 14:43:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613688184; cv=none; d=google.com; s=arc-20160816; b=lvsnIlYB6n8lHs5GqXGonAgffWmz2eIMpLz8SxoqouYK/ec7FhJHsRK6Ig5hQ6ACz3 eT8kvfYmrHm0wYx7EcIh3NyIKscOkehJC+gXacQvWdWYhEtgFkXm4szhR4j+VAr4bKXb vzRSOAARc7wEXzOrq7yR4oCmtJXELkIlOvuXIhVK5MS/kf2yKRCF0TRXFpyo08WEZBKo YA994PW0+GNuah74Eksa15gMdzB7NDf/N/R04CMBtKtcj/pjHu77vTLYDiS3BOcc0Aec kdA9gU6XM1XtSu1mCOX/rfUuH1Owkp76ExLnRkw3V86RWgWTJiFfj78dGgkwHMvYoPPr /NjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=hqGU8nDvwR4AHfpNuVjjBdBUVsPsMPgnacvz+gN7HU0=; b=BdSUCj1+pm1Vem6ENfw1zzg6JpU+Hm6fq49xFEXpmj9DGfkFUj+Rzq9iylE7MtNe7G 4wFyPGCnQtQm6A5EDZYqMPw2S/qmR641TF9nx8OgXFSXw9S/gkWdSyhXRFKKDyBRrG9a L+v07Aleh7cUtZXHXDftGymm1wi87huLpwNYtmVcp0qNcJ+IoShc+eYjkUP7oLKcvDPF XPaTvU4IonJmZmHVrxqzgTIUUp6p7nq5aoecUU7o1q1Q3ZsnuhOPz1glbAjMHWKtW8bJ spV6oYLbo+9LSr+eYwLedNnxw7p8VP3x+EyftxKR+uHbjadUTj2x3JofLg42iUNmpfOD d6Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 6si4396891ejm.364.2021.02.18.14.42.41; Thu, 18 Feb 2021 14:43:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229712AbhBRWmA (ORCPT + 99 others); Thu, 18 Feb 2021 17:42:00 -0500 Received: from mga09.intel.com ([134.134.136.24]:30060 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbhBRWl7 (ORCPT ); Thu, 18 Feb 2021 17:41:59 -0500 IronPort-SDR: 2LxtBTzaanOxnVzxYi2Csj7Cc6oj1qNMr5XflbzPlG5oEO1cXthnuee5pdR3WnbdqLkJPF1WNq rFwoyciTjHxg== X-IronPort-AV: E=McAfee;i="6000,8403,9899"; a="183795632" X-IronPort-AV: E=Sophos;i="5.81,187,1610438400"; d="scan'208";a="183795632" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2021 14:40:13 -0800 IronPort-SDR: mc6JN6ROJoj+0dVv6lfqxO01dy5p7T3HGwym7aEtBvygoS4w2OEMQ4EO/hU9ECxoi4tXeuKh+D 6u/4wXmx7U8g== X-IronPort-AV: E=Sophos;i="5.81,187,1610438400"; d="scan'208";a="386263740" Received: from smtp.ostc.intel.com ([10.54.29.231]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2021 14:40:12 -0800 Received: from localhost (mtg-dev.jf.intel.com [10.54.74.10]) by smtp.ostc.intel.com (Postfix) with ESMTP id 8F77E6365; Thu, 18 Feb 2021 14:40:12 -0800 (PST) Date: Thu, 18 Feb 2021 14:40:12 -0800 From: mark gross To: Jassi Brar Cc: "Alessandrelli, Daniele" , "mgross@linux.intel.com" , "dragan.cvetic@xilinx.com" , "corbet@lwn.net" , "palmerdabbelt@google.com" , "markgross@kernel.org" , "damien.lemoal@wdc.com" , "bp@suse.de" , "gregkh@linuxfoundation.org" , "paul.walmsley@sifive.com" , "arnd@arndb.de" , "shawnguo@kernel.org" , "peng.fan@nxp.com" , "robh+dt@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 03/34] mailbox: vpu-ipc-mailbox: Add support for Intel VPU IPC mailbox Message-ID: <20210218224011.GA134379@linux.intel.com> Reply-To: mgross@linux.intel.com References: <20210212222304.110194-1-mgross@linux.intel.com> <20210212222304.110194-4-mgross@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 18, 2021 at 03:09:55PM -0600, Jassi Brar wrote: > On Thu, Feb 18, 2021 at 6:02 AM Alessandrelli, Daniele > wrote: > > > > Hi Jassi, > > > > Thank you very much for your feedback. > > > > On Sun, 2021-02-14 at 22:54 -0600, Jassi Brar wrote: > > > IIUIC, maybe the solution is simpler .... What if we set txdone_poll. > > > Always return success in send_data(). And check if we overflew the > > > fifo in last_tx_done(). If we did overflow, try to rewrite the data > > > and check again. Return true, if not overflew this time, otherwise > > > return false so that mailbox api can ask us to try again in next > > > last_tx_done(). This way we can do away with the tasklet and, more > > > importantly, avoid send_data() failures and retries on clients' part. > > > > That's a clever solution to avoid the tasklet. The only issue for us is > > the automatic TX retry from the controller. I understand that's > > generally a desirable feature, but in our case we'd like the client to > > have full control on re-transmission attempts. > > > > That's because some of our data is time-sensitive. For instance, when > > we process frames from a video stream we prefer dropping a frame rather > > than re-transmitting it and delaying the processing of the rest. > > > > Now, I understand that the client can set the 'tx_block' and 'tx_tout' > > channel fields to specify how long it wishes to wait, but the problem > > is that our (single) channel is shared between multiple applications > > having different timing requirements. That's why we prefer to let > > applications deal we re-transmissions. > > > > Given the above, do you think it's reasonable to leave the > > implementation as it is now? > > (from initial analysis, the tasklet doesn't seem to affect the > > performance of our use cases significantly, so we are fine with it) > > > Yup. It is intel specific so, hopefully, we don't have to deal with > other vendors trying to support their use cases. > Are you targeting the next merge window or this one? > Its a bit late for the v5.12 merge window for most of the code in this patchset at this point but, if you feel like getting this inital bit in that would be great. I'm hoping we can get the rest of this series into linux-next after RC1. --mark