From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF64AC43381 for ; Mon, 25 Mar 2019 05:14:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CAFD205C9 for ; Mon, 25 Mar 2019 05:14:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k0W5colr"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VoHIWR8D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CAFD205C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MdW+dHBUL2WDhrxpA5/QNy00nhngWGPNgK+212b2y0E=; b=k0W5colrzVWkXI cWEguKMGr9t0pleshcB9ev5EDl2pynCzmrNH6SDrDJbUDrF2y6DqoDW2UiVJKaXmpL+6lHeIlVtLq obPvH6LUAJ7vQmp1r4ZNRno5Kwl6I96Km0dFMXFcX5ochFb41M19pSrmk4bwbS6VoIl+8lnNWkrFk OITAAEA6qc8tKIGmqNs+e7C82yPmJyYFuqO5aspV3XL3jysFFxeLOpPJi+o77xq12SI28T/xc9FXl 2l+XjMeWPzfi626bK5W4moUHQYRzS4wCwfnNiBbsIvPijOVx42SBLAHafPwko577ognJf0VHBF8Az S43ANxbW1GEDfKtFT5bA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8Hvs-0007AT-Ou; Mon, 25 Mar 2019 05:14:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8Hvn-00078u-0T for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2019 05:13:59 +0000 Received: from localhost (unknown [171.61.95.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 381212070D; Mon, 25 Mar 2019 05:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553490826; bh=GVx3/UqV8RYHv/WnH/IJQULUjPeEafeQqc+2Won0nQg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VoHIWR8Dc09Us5vFdQo04OdAED/8W32AHUjwTDHXZBeWF9yqla6Ads3IQwwYxPAyR urHRfYNVeyvLDJ1hbWwJhOkr8HRF+ePhLYt2fUpgj3bXwK8gdYAD1hnRwU4++8mI+1 Q8X0ZrTuK7/omvjvekEub8J/50NDI+biBxXnpnfg= Date: Mon, 25 Mar 2019 10:43:41 +0530 From: Vinod Koul To: Jean-Nicolas Graux Subject: Re: [PATCH] dmaengine: pl08x: be fair when re-assigning physical channel Message-ID: <20190325051341.GK5348@vkoul-mobl> References: <1551711838-19913-1-git-send-email-jean-nicolas.graux@st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1551711838-19913-1-git-send-email-jean-nicolas.graux@st.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190324_221355_068340_7DA114AE X-CRM114-Status: GOOD ( 11.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, Linus Walleij , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 04-03-19, 16:03, Jean-Nicolas Graux wrote: > Current way we find a waiting virtual channel for the next transfer > at the time one physical channel becomes free is not really fair. > > More in details, in case there is more than one channel waiting at a time, > by just going through the arrays of memcpy and slave channels and stopping > as soon as state match waiting state, channels with high indexes can be > penalized. > > Whenever dma engine is substantially overloaded so that we constantly > get several channels waiting, channels with highest indexes might not > be served for a substantial time which in the worse case, might hang > task that wait for dma transfer to complete. > > This patch makes physical channel re-assignment more fair by storing > time in jiffies when a channel is put in waiting state. Whenever a > physical channel has to be re-assigned, this time is used to select > channel that is waiting for the longest time. Applied, thanks -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel