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=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 89E2CC43381 for ; Mon, 25 Mar 2019 08:15:52 +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 1E3F920879 for ; Mon, 25 Mar 2019 08:15:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GQURX62i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E3F920879 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=st.com 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:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mUYnlLGwAWz5RrBVAPC4qSNOyYtLknhSJpHPviwFluc=; b=GQURX62ihxAmFd OxNxlIbylxYxT7XDH09rP4abAZvxJ7tfOkczRlKipzj07jEqaZUezy6LFDsHkmakNA583QsGZW/vX vx//7CF8bY1YLGWK+fGoRMuHJpiLwHMuMveh1f6uenIUw8G7mqfRnUZXofBMv12EpybhrmAjlPn2E 3aKS4otkUIZ75JTDfZNAm/z3zpmLNrRESVakA9a0S6ecfngjsAbeGJ3hWQwpKEQNs2TRbZNYC3cDb oi++Y4rFiJyEkAp2YmOI++Xks0Q9Cmze+6y1griJIaXM4KUiJrClf+KeW8kIkEMvYSuOfN+DWW0hV DWMiU3UO7kOoMKWxYQnw==; 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 1h8KlO-0003Fc-2C; Mon, 25 Mar 2019 08:15:22 +0000 Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8KlI-0002SK-L5 for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2019 08:15:19 +0000 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2P8CGxb028877; Mon, 25 Mar 2019 09:15:01 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2rddh79wvg-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 25 Mar 2019 09:15:01 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D46D242; Mon, 25 Mar 2019 08:15:00 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AD10F2460; Mon, 25 Mar 2019 08:15:00 +0000 (GMT) Received: from SFHDAG6NODE1.st.com (10.75.127.16) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 25 Mar 2019 09:15:00 +0100 Received: from SFHDAG6NODE1.st.com ([fe80::8d96:4406:44e3:eb27]) by SFHDAG6NODE1.st.com ([fe80::8d96:4406:44e3:eb27%20]) with mapi id 15.00.1347.000; Mon, 25 Mar 2019 09:15:00 +0100 From: Jean Nicolas GRAUX To: Vinod Koul Subject: Re: [PATCH] dmaengine: pl08x: be fair when re-assigning physical channel Thread-Topic: [PATCH] dmaengine: pl08x: be fair when re-assigning physical channel Thread-Index: AQHU4smICO0Ykc6RnEexo+x/35zwCaYb71aA Date: Mon, 25 Mar 2019 08:15:00 +0000 Message-ID: References: <1551711838-19913-1-git-send-email-jean-nicolas.graux@st.com> <20190325051341.GK5348@vkoul-mobl> In-Reply-To: <20190325051341.GK5348@vkoul-mobl> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.49] Content-ID: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-25_06:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_011517_007468_20C8FC93 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. 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 3/25/19 6:13 AM, Vinod Koul wrote: > 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 > Hello Vinod, You are welcome. Regards. Jean-Nicolas. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel