public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Umang Jain <umang.jain@ideasonboard.com>
Cc: linux-staging@lists.linux.dev,
	Stefan Wahren <stefan.wahren@i2se.com>,
	Dan Carpenter <error27@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Phil Elwell <phil@raspberrypi.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: Re: [PATCH v2 5/6] staging: vc04_services: Drop global variables tracking allocated pages
Date: Sat, 16 Mar 2024 10:13:42 +0000	[thread overview]
Message-ID: <171058402272.2556397.13398361772841752704@ping.linuxembedded.co.uk> (raw)
In-Reply-To: <ea63d6ee-73bf-47de-a19c-6c83bcc0f374@moroto.mountain>

Quoting Dan Carpenter (2024-03-16 08:41:50)
> On Fri, Mar 15, 2024 at 11:17:15AM +0530, Umang Jain wrote:
> > Hi,
> > 
> > On 14/03/24 8:24 pm, Kieran Bingham wrote:
> > > Quoting Umang Jain (2024-03-14 10:06:06)
> > > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > > > index 282f83b335d4..666ab73ce0d1 100644
> > > > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > > > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > > > @@ -140,12 +140,6 @@ struct vchiq_pagelist_info {
> > > >   };
> > > >   static void __iomem *g_regs;
> > > What happens with this one ? Is it essential to be global? Can it be
> > > part of the device? Who's mapping it? or unmapping?
> > > 
> > > If we're keeping it global, I'd add a comment...
> > 
> > The keyword in the series in 'non-essential' and I feel this one is
> > essential one.
> > 
> > It's on the irq request path so encapsulating it in the platform driver data
> > and then again trying to get it from there, will make this affect
> > performance.
> > 
> > See remote_event_signal() and vchiq_doorbell_irq()  in vchiq_arm.c
> > 
> 
> The fast path argument was convincing up to here
> 
> > (For testing, a added a dev_info() in the vchiq_doorbell_irq() and it
> > brought down the consistent 30fps IMX219 streaming to (15-26)fps
> > inconsistent range)
> > 
> 
> but doing a dev_info() seems way way more expensive than dereferencing
> in some pointers in driver data...

Indeed, I think even in IRQ context here we should be fine to
dereference the pointers here, and can get rid of the last global.

> Anyway, adding a comment seems like a good idea.

If there's a reason this doesn't work, or if it does break the tests
then a comment should describe that for sure.

--
Kieran


> 
> regards,
> dan carpenter
>

  reply	other threads:[~2024-03-16 10:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14 10:06 [PATCH v2 0/6] staging: vc04_services: Drop non-essential global members Umang Jain
2024-03-14 10:06 ` [PATCH v2 1/6] staging: vc04_services: Drop g_once_init global variable Umang Jain
2024-03-14 13:00   ` Kieran Bingham
2024-03-15 10:58   ` Laurent Pinchart
2024-03-14 10:06 ` [PATCH v2 2/6] staging: vc04_services: vchiq_arm: Move struct vchiq_drvdata to header Umang Jain
2024-03-14 13:05   ` Kieran Bingham
2024-03-14 10:06 ` [PATCH v2 3/6] staging: vc04_services: Drop global members for tracking connections Umang Jain
2024-03-14 13:16   ` Kieran Bingham
2024-03-15 11:50     ` Laurent Pinchart
2024-03-14 10:06 ` [PATCH v2 4/6] staging: vc04_services: vchiq_arm: Drop g_cache_line_size Umang Jain
2024-03-14 14:51   ` Kieran Bingham
2024-03-14 15:39     ` Dan Carpenter
2024-03-14 10:06 ` [PATCH v2 5/6] staging: vc04_services: Drop global variables tracking allocated pages Umang Jain
2024-03-14 14:54   ` Kieran Bingham
2024-03-14 15:45     ` Dan Carpenter
2024-03-15  5:47     ` Umang Jain
2024-03-16  8:41       ` Dan Carpenter
2024-03-16 10:13         ` Kieran Bingham [this message]
2024-03-14 10:06 ` [PATCH v2 6/6] staging: vc04_services: Drop completed TODO item Umang Jain
2024-03-14 11:19 ` [PATCH v2 0/6] staging: vc04_services: Drop non-essential global members Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171058402272.2556397.13398361772841752704@ping.linuxembedded.co.uk \
    --to=kieran.bingham@ideasonboard.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=error27@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@raspberrypi.com \
    --cc=stefan.wahren@i2se.com \
    --cc=umang.jain@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox