Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8985837ybi; Tue, 23 Jul 2019 19:30:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSTGlJn/V0k0LPb14UxuW12GX+ghm18JGOI4VI0e4BABpsmqPiW4kGZBRstBbd/DFSul3o X-Received: by 2002:a63:2006:: with SMTP id g6mr77938829pgg.287.1563935419823; Tue, 23 Jul 2019 19:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935419; cv=none; d=google.com; s=arc-20160816; b=A5FS11VpSxBJnO0+Ke8CxC7XhUDB0bymVVPuHv+NSarDsl9xQtwRfpd8nWiBTwwXMy eq2gZ24pXC1SGBmzGr8x3yvfKflqVrX44Valdg/1mrl0MaWhqrg6vY75sZrGNucfxJvq ldENOxLypcSGfoygcWc0T3FDBC3mwYJueavvErmcRedh63POM3UIEN5FGg3GqhIIuGbw CwklcahWxHGjBvoqmovzCIA5lfewZpCWdeES+waJrnHFrA+pCKUNO+jd0gTagfk+gp+a owzIoeIp9+khW+MT14UtsKtxEmW+YQxR+xov3ZyL2UDQS8e37Ve2gfNYsYOSM7K5Gasm P8Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=g/2BGGrFh2KLC5qxtGNSu6iKrTWzABVeH6rFOx3c7Qw=; b=dgoLhe/TIZO/RavAEtY5clFqSgIdA76Ap27WWTTUbZnVcEzRMlXC8kS65JpwHBM+yD W/ojXsuzL0+te30mIknKa1pIJPU8IOSzV4LrtTaHpJtj/4lasOnrdVEo3Nvwt8FVyIkH yTGw4Fg3K3j6S6AlHmPWqqWrmCCsrvHmGWjeEy2C5p9XGGfc8FKkO3tXdIhieuG0Eh6t 9knEFN/1OpUZsuQrCUey2ioDxX6PvRgufxwPmRVx0PO+YfOv3mWLAuCyRn4tpYrHkR80 tYz/vaZNadvXB9VN1qtlsRsHjpNulXgU2DdR2c/abulW5TCBDoFGpN+d1mKtX7tPKohV 3IDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BL1zhkUP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 12si13575286pfi.199.2019.07.23.19.30.03; Tue, 23 Jul 2019 19:30:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BL1zhkUP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387774AbfGWUgl (ORCPT + 99 others); Tue, 23 Jul 2019 16:36:41 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:42972 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730380AbfGWUgl (ORCPT ); Tue, 23 Jul 2019 16:36:41 -0400 Received: by mail-oi1-f195.google.com with SMTP id s184so33339534oie.9 for ; Tue, 23 Jul 2019 13:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g/2BGGrFh2KLC5qxtGNSu6iKrTWzABVeH6rFOx3c7Qw=; b=BL1zhkUPPRxU40lcrS8uiFDXE+2BGu9l8vsUdji2crvpvlihwTFnCFaONc/CM3nZ+f 6sgtoSkf2YWktAl7/P+aU1k4z7V5yXaYQ2kOb8j4r5fi2LyqwQiOjUWHyrIWioWCL4Bs 81pw6zpZ5iETwRan/qS15wby7O/Aks2MjCm1+j0tIEqdT6jqBDDXAgqGnY+cAwKOTWSL oc5DNx3zubzmiP8dpeGOYZZu/Un6Lr6gO0U68bhBmOm7gWRpz3C6sgl8wJGVoegzWCM0 M1l6y+DSuH8YHY2mifWrqjdF0tJodWFDASRV75XKcIRd+IfHEcXJ/f31HGcLizZeadfs EBUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g/2BGGrFh2KLC5qxtGNSu6iKrTWzABVeH6rFOx3c7Qw=; b=WZ9rf3fMGjlfRk3PcmpvUjYweFBdMFsIcRXB91zKzMAfho+eTFK9I3d2V5p6BrlWLZ AQ0LdMM+lcRmv3lm4aeYvMumWvbKTa+UY4/kH7Wr491Z3tx5AaYL6ykG4qrQczbArRMj byOugidWcly5C5NMkmL/pUQkR7qFUvh0sD1KFS9fs3fRID9tOv6Bb6f2dLpSAqQKV00Q vpDCF8zU6ZSGxT/VDX4SXMbmLg7s09HCOh8uHU+W1vBVBFxZMYznIuoPmUYzt5ald7GW e9b4OwjloAZYHzC/9PTirT8dPQQxF6zBX0ehfArkXK3Q2Jh2o6FLJ2+rUle+k1mBqX3O flpw== X-Gm-Message-State: APjAAAVEymrcdsXdBJv0X4H68+6cUaCJktWnZVaxqErkBPx3L46YCiWL 8OODt3XJvpNXAkbd01aQUyoazfhyNcbzkyZubuSm6Q== X-Received: by 2002:aca:5106:: with SMTP id f6mr40545168oib.69.1563914199859; Tue, 23 Jul 2019 13:36:39 -0700 (PDT) MIME-Version: 1.0 References: <20190717222340.137578-1-saravanak@google.com> <20190717222340.137578-4-saravanak@google.com> <20190723102842.t2s45zzylsjuccm4@vireshk-i7> In-Reply-To: <20190723102842.t2s45zzylsjuccm4@vireshk-i7> From: Saravana Kannan Date: Tue, 23 Jul 2019 13:36:03 -0700 Message-ID: Subject: Re: [PATCH v3 3/5] OPP: Improve require-opps linking To: Viresh Kumar Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , Sibi Sankar , Android Kernel Team , Linux PM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Resending again due to accidental HTML (minor rewording/typo fixes too). On Tue, Jul 23, 2019 at 3:28 AM Viresh Kumar wrote: > > $subject doesn't have correct property name. > > On 17-07-19, 15:23, Saravana Kannan wrote: > > Currently, the linking of required-opps fails silently if the > > destination OPP table hasn't been added before the source OPP table is > > added. This puts an unnecessary requirement that the destination table > > be added before the source table is added. > > > > In reality, the destination table is needed only when we try to > > translate from source OPP to destination OPP. So, instead of > > completely failing, retry linking the tables when the translation is > > attempted. > > > > Signed-off-by: Saravana Kannan > > --- > > drivers/opp/core.c | 32 +++++++++++----- > > drivers/opp/of.c | 91 ++++++++++++++++++++++------------------------ > > drivers/opp/opp.h | 5 +++ > > 3 files changed, 71 insertions(+), 57 deletions(-) > > Here is the general feedback and requirements I have: > > - We shouldn't do it from _set_required_opps() but way earlier, it > shouldn't affect the fast path (where we change the frequency). I don't think there's any other intermediate OPP API call where we can try to lazily link the tables. Also if the tables are already fully linked, I don't think this is really going to slow down the fast path in anyway (because it's just a few NULL checks). If you have other ideas, I'm willing to look at it. But as it is right now seems the best to me. > - Programming required-opps for half of the properties isn't correct, > i.e. in case only few of the required-opps are parsed until now. So > setting of rate shouldn't even start unless the OPP table is fully > initialized with all required-opps in it. Ok, I can fix this. -Saravana