public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Need some guidance working on a TODO item
       [not found] <CAG-BmoeV6zGZLk53Z6jr2WSr+5wvmo5=YtnLAAUeEkEqn_nf5w@mail.gmail.com>
@ 2023-10-31  0:04 ` Laurent Pinchart
  2023-10-31 11:15   ` Ghanshyam Agrawal
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2023-10-31  0:04 UTC (permalink / raw)
  To: Ghanshyam Agrawal; +Cc: linux-media

Hello Ghanshyam,

CC'ing the linux-media mailing list, to let other developers chime in as
well.

On Sat, Oct 28, 2023 at 04:07:03PM +0530, Ghanshyam Agrawal wrote:
> Hello Laurent,
> 
> Line 90 in file "drivers/media/usb/uvc/uvcvideo.h" in linux_mainline tree
> states
> 
> /*
>  * TODO: Put the most frequently accessed fields at the beginning of
>  * structures to maximize cache efficiency.
>  */
> 
> I am working on this todo item. Can you please guide me regarding 
> 
> 1. How can I find the number of accesses of each of the fields?

By reading through the code :-) It may be possible to instrument that,
but I have no idea how.

> 2. How can I find out the cache efficiency?

Do you know how caches work ?

> 3. When we say cache, which cache are we talking about?

The CPU caches, any level.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Need some guidance working on a TODO item
  2023-10-31  0:04 ` Need some guidance working on a TODO item Laurent Pinchart
@ 2023-10-31 11:15   ` Ghanshyam Agrawal
  0 siblings, 0 replies; 2+ messages in thread
From: Ghanshyam Agrawal @ 2023-10-31 11:15 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

On Tue, Oct 31, 2023 at 5:34 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hello Ghanshyam,
>
> CC'ing the linux-media mailing list, to let other developers chime in as
> well.
>
> On Sat, Oct 28, 2023 at 04:07:03PM +0530, Ghanshyam Agrawal wrote:
> > Hello Laurent,
> >
> > Line 90 in file "drivers/media/usb/uvc/uvcvideo.h" in linux_mainline tree
> > states
> >
> > /*
> >  * TODO: Put the most frequently accessed fields at the beginning of
> >  * structures to maximize cache efficiency.
> >  */
> >
> > I am working on this todo item. Can you please guide me regarding
> >
> > 1. How can I find the number of accesses of each of the fields?
>
> By reading through the code :-) It may be possible to instrument that,
> but I have no idea how.
>
> > 2. How can I find out the cache efficiency?
>
> Do you know how caches work ?
>
> > 3. When we say cache, which cache are we talking about?
>
> The CPU caches, any level.
>
> --
> Regards,
>
> Laurent Pinchart

Hello Laurent,

Thanks for your email. I will read the code and figure out which
fields are accessed more frequently. I do have an understanding of the
caching mechanism; and as you mentioned "cpu caches", I will find out
the efficiency accordingly.

Thanks again. I appreciate your response.

Regards,
Ghanshyam Agrawal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-31 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAG-BmoeV6zGZLk53Z6jr2WSr+5wvmo5=YtnLAAUeEkEqn_nf5w@mail.gmail.com>
2023-10-31  0:04 ` Need some guidance working on a TODO item Laurent Pinchart
2023-10-31 11:15   ` Ghanshyam Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox