From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754194AbbIJJn2 (ORCPT ); Thu, 10 Sep 2015 05:43:28 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:37385 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241AbbIJJnK (ORCPT ); Thu, 10 Sep 2015 05:43:10 -0400 Subject: Re: [PATCH] ASoC: make dapm cache search depth configurable To: Mark Brown , Nikesh Oswal References: <1441707097-11200-1-git-send-email-nikesh@opensource.wolfsonmicro.com> <20150908104241.GA9751@sirena.org.uk> CC: , , , , , , From: Nikesh Message-ID: <55F1509A.4040303@opensource.wolfsonmicro.com> Date: Thu, 10 Sep 2015 10:42:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150908104241.GA9751@sirena.org.uk> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-09-10_03:2015-09-08,2015-09-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1508030000 definitions=main-1509100152 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, The reason I though this will be usefull is as below: While adding paths the source or sink widgets of consecutive path that are being added, may not be immediate neighbours in widget list. Hence in such scenarios the cache hits will reduce. One possible solution is to rearrange the widgets in the codec driver but sometimes codec driver uses some macros to create a bunch of related widgets which we may want to skip in the cache search. So a configurable cache search depth caters to such scenarios. For example in wm5110.c the frequently occuring mixer routes are defined by ARIZONA_MIXER_INPUT_ROUTES, so as to maximise the cache hit codec driver can register all the source widgets in exactly the same order (by rearranging the widgets in wm5110_dapm_widgets[]) as defined in this macro. But if you notice the way DSP widgets are created they use a WM_ADSP2 macro which creates a preloader widget for every DSP widget and we want to skip past this preloader widget when doing a cache search so increasing the cache search depth helps here. Thanks, Nikesh On 08/09/15 11:42, Mark Brown wrote: > On Tue, Sep 08, 2015 at 11:11:37AM +0100, Nikesh Oswal wrote: >> cache search depth will have a default value of 2 and can >> be modified by the respective component probe function > Why?