Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933004AbdHVOQI (ORCPT ); Tue, 22 Aug 2017 10:16:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:36194 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932510AbdHVOQG (ORCPT ); Tue, 22 Aug 2017 10:16:06 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 377B86044E 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=sricharan@codeaurora.org Subject: Re: [PATCH 13/18] rpmsg: glink: Add rx done command To: Arun Kumar Neelakantam , ohad@wizery.com, bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1502903951-5403-1-git-send-email-sricharan@codeaurora.org> <1502903951-5403-14-git-send-email-sricharan@codeaurora.org> From: Sricharan R Message-ID: <67a2b4db-fabb-9787-6813-7bd001814bfc@codeaurora.org> Date: Tue, 22 Aug 2017 19:46:00 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Antivirus: Avast (VPS 170822-2, 08/22/2017), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1546 Lines: 34 Hi, >> +    /* Take it off the tree of receive intents */ >> +    if (!intent->reuse) { >> +        spin_lock(&channel->intent_lock); >> +        idr_remove(&channel->liids, intent->id); >> +        spin_unlock(&channel->intent_lock); >> +    } >> + >> +    /* Schedule the sending of a rx_done indication */ >> +    spin_lock(&channel->intent_lock); >> +    list_add_tail(&intent->node, &channel->done_intents); >> +    spin_unlock(&channel->intent_lock); >> + >> +    schedule_work(&channel->intent_work); > > Adding one more parallel path will hit performance, if this worker could not get CPU cycles > or blocked by other RT or HIGH_PRIO worker on global worker pool. The idea is, by design to have parallel non-blocking paths for rx and tx (that is done as a part of rx by sending the rx_done command), otherwise trying to send the rx_done command in the rx isr context is a problem since the tx can wait for the FIFO space and in worst case, can even lead to a potential deadlock if both the local and remote try the same. Having said that, instead of queuing this work in to the global queue, this can be put in to a local glink edge owned queue (or) a threaded isr ?, downstream does the rx_done in a client specific worker. Regards, Sricharan -- "QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus