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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 528ADC43381 for ; Mon, 4 Mar 2019 10:38:05 +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 22012206B8 for ; Mon, 4 Mar 2019 10:38:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cG5Ih60K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22012206B8 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=tOkJ3rXVrThgp1XTB3HRbQr5uw9pxLBtcd69N/SRXUY=; b=cG5Ih60KlOlf6H wT1Oii3/apXrsUqbcY3Dz46uRN746gS7BEiL+QbUN920wHyX91flHh3pEEspztkDuCmTHfkMUZ1BZ ukm093/HOYKCVRfKaX7KC2nyoXZav5PPt6KDZwxNeXHC5NMig2mFh0tDa3VMNEvFdRiDs54Q3KZRq sILoQi5+oDNM0HA8tGNC3sGiDPbLBqgP00NLmWnAnzgGtqTDK1kK5ceYYEvLFKS2E0X3S/6znsu0C kbdUfGtGGKrQ6q9BZ2nD9hksr2xRaBAlTRzF6DfvsJ2v3HtYZVGmk9KATDli6XMcg/5F7+BhcrPOQ yLvUM7x243MtEcj6PggA==; 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 1h0kyt-0001d0-VX; Mon, 04 Mar 2019 10:37:59 +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 1h0kyq-0001cV-9G for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2019 10:37:58 +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 x24Aawxv032340; Mon, 4 Mar 2019 11:37:46 +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 2qygfxatjv-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 04 Mar 2019 11:37:46 +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 C53F63A; Mon, 4 Mar 2019 10:37:45 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9F3762737; Mon, 4 Mar 2019 10:37:45 +0000 (GMT) Received: from SFHDAG6NODE1.st.com (10.75.127.16) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 4 Mar 2019 11:37:45 +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, 4 Mar 2019 11:37:45 +0100 From: Jean Nicolas GRAUX To: Linus Walleij , "dmaengine@vger.kernel.org" , 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: AQHU0nE0+SW5lV7aS0qKQyuwmvl+rKX7NvQA Date: Mon, 4 Mar 2019 10:37:45 +0000 Message-ID: <8b3ca76d-5df4-d63a-5bf9-83bfbe1a694c@st.com> References: <1551457100-13452-1-git-send-email-jean-nicolas.graux@st.com> In-Reply-To: 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.4.0 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.50] Content-ID: <2B1E35117C89B94D832497BB961DD93D@st.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-04_04:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_023756_619423_7AE94BF6 X-CRM114-Status: GOOD ( 18.49 ) 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: Linux ARM 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 Hello Linus, You are welcome ;) On 04/03/2019 11:00 AM, Linus Walleij wrote: > Hi Jean-Nicolas, > > thanks for your patch! > > You will have to resent the patch to the DMAengine list and the maintainer > (Vinod). Sure I will. Sorry for that mistake. > > Out of curiosity: what platform are you using this on? That's for the STMicro STA1295/STA1385 SoCs which make use of several ARM amba peripherals as well as nomadik gpio/pinctrl, etc ... Those machines are unfortunately not available upstream. I would like to allocate time for that but as you know, such activity require to dedicate substantial time & human resource. And we failed to find enough time for that up to now. > > On Fri, Mar 1, 2019 at 5:18 PM 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. >> >> Signed-off-by: Jean-Nicolas Graux > That's a neat trick, look like a good idea. Please add some > comment in the code in pl08x_phy_free() so it is clear > what is going on for people reading the code, with that: > Reviewed-by: Linus Walleij I will. Thanks for the review. Regards. Jean-Nicolas. > > Yours, > Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel