All of lore.kernel.org
 help / color / mirror / Atom feed
* mmap()
@ 2009-01-06 17:07 niamathullah sharief
  0 siblings, 0 replies; 6+ messages in thread
From: niamathullah sharief @ 2009-01-06 17:07 UTC (permalink / raw)
  To: video4linux-list

HelloCan anyone tell me how this mmap() works,how its creates the buffer and how its storing the video in that buffer..can anyone explain as algorithm with mmap() and ioctl() functions with their parameters...Thanks..


      Download prohibited? No problem. CHAT from any browser, without download. Go to http://in.webmessenger.yahoo.com/
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

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

* mmap()
@ 2010-07-31  4:21 Manu Abraham
  0 siblings, 0 replies; 6+ messages in thread
From: Manu Abraham @ 2010-07-31  4:21 UTC (permalink / raw)
  To: npiggin, piggin, nickpiggin; +Cc: linux-mm, Andrew Morton

Hi Nick, all,

With mmap() VM operations, with a page fault would it be possible to
allocate/map more than one page ?

I will try to explain a bit more in detail, what I would like to do.

I have a PCIe bridge which can capture frames at very high resolutions
at a very fast rate. Based on the requirements, these chipsets handle
memory in a way slightly different to other frame grabber chipsets.
They have an onchip MMU with a DMA Multiplexer, where the chipset has
to be allocated with all the relevant memory needed for operation at
chip initialization time. The allocated memory is 2MB (512 pages long,
can be contiguous or non-contiguous). There needs to be a minimal of 8
such buffers. ie, total 16MB each.

The user application can read each 2MB buffer (Scatter Gather list) on
an IRQ/MSI event. The buffer to be read from (of the 8 buffers) go
around on a round-robin fashion. I would like to avoid a memcpy of the
buffers in this application, basically due to the bandwidth in use.
Initially, I thought about mmap(), where  2 such buffers (where the
total visible virtual region appears as 4MB long):


1.  Init-> Buffer1 mapped into the first half
2.  Page fault -> Buffer2 mapped into the second half
3.  Page fault-> Buffer1 unmapped; Buffer3 mapped into first half
4.  Page fault-> Buffer2 unmapped; Buffer4 mapped into second half
5.  Page fault-> Buffer3 unmapped; Buffer5 mapped into first half
6.  Page fault-> Buffer4 unmapped; Buffer6 mapped into second half
7.  Page fault-> Buffer5 unmapped; Buffer7 mapped into first half
8.  Page fault-> Buffer6 unmapped; Buffer8 mapped into second half
9.  Page fault-> Buffer7 unmapped; Buffer1 mapped into first half
10. Page fault-> Buffer8 unmapped; Buffer2 mapped into second half


and the cycle goes on. I was wondering whether there's any option to
map the buffers in such a way, rather than to do map/allocate a page
on each page fault ? I really looked many places, but couldn't really
make out something similar and hence my query.

Ideas and thoughts would be much appreciated.

Thanks,
Manu

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: mmap()
       [not found] <568610.95410.qm@web65506.mail.ac4.yahoo.com>
@ 2009-01-24 23:31 ` niamathullah sharief
  0 siblings, 0 replies; 6+ messages in thread
From: niamathullah sharief @ 2009-01-24 23:31 UTC (permalink / raw)
  To: michael_h_williamson, video4linux list, Kernel newbies



ok micheal...Thanks..actually when we capture the video from webcam how that video is captured and where it stores?and how it finds the memory location to store that captured data?



      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

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

* Re: mmap()
       [not found] <596339.38105.qm@web65507.mail.ac4.yahoo.com>
@ 2009-01-24  2:15 ` niamathullah sharief
  0 siblings, 0 replies; 6+ messages in thread
From: niamathullah sharief @ 2009-01-24  2:15 UTC (permalink / raw)
  To: michael_h_williamson, Kernel newbies, video4linux list


micheal..you are telling that read() function will do the
 same as the mmap() does...so this both function are reading the data from the memory location...am i right?...if yes how the data exist there?after catching the video whether the data stored in default free location are any othere mapping function is there to store theat captured data?

--- On Sat, 24/1/09, Michael Williamson <michael_h_williamson@yahoo.com> wrote:
From: Michael Williamson <michael_h_williamson@yahoo.com>
Subject: Re: mmap()
To: shariefbe@yahoo.co.in
Date: Saturday, 24 January, 2009, 12:53 AM



--- On Fri, 1/23/09, niamathullah sharief <shariefbe@yahoo.co.in> wrote:

> From: niamathullah sharief <shariefbe@yahoo.co.in>
> Subject: Re: mmap()
> To: michael_h_williamson@yahoo.com, "video4linux list"
<video4linux-list@redhat.com>, "Kernel newbies"
<kernelnewbies@nl.linux.org>
> Date: Friday, January 23, 2009, 12:41 PM
> micheal..you are telling that read() function will do the
> same as the mmap() does..but the read() will read the data
> from the memory i think....is this ,,ap() is also doing the
> same one?if yes....how its actually the data (when capturing
> the video) was stored in memory....?



I do not understand your question.

-Mike



      



      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

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

* Re: mmap()
       [not found] <787717.19693.qm@web65509.mail.ac4.yahoo.com>
@ 2009-01-23 18:41 ` niamathullah sharief
  0 siblings, 0 replies; 6+ messages in thread
From: niamathullah sharief @ 2009-01-23 18:41 UTC (permalink / raw)
  To: michael_h_williamson, video4linux list, Kernel newbies


micheal..you are telling that read() function will do the same as the mmap() does..but the read() will read the data from the memory i think....is this ,,ap() is also doing the same one?if yes....how its actually the data (when capturing the video) was stored in memory....?
--- On Fri, 23/1/09, Michael Williamson <michael_h_williamson@yahoo.com> wrote:
From: Michael Williamson <michael_h_williamson@yahoo.com>
Subject: Re: mmap()
To: shariefbe@yahoo.co.in
Date: Friday, 23 January, 2009, 10:28 PM



--- On Fri, 1/23/09, niamathullah sharief <shariefbe@yahoo.co.in> wrote:

> From: niamathullah sharief <shariefbe@yahoo.co.in>
> Subject: mmap()
> To: "video4linux list" <video4linux-list@redhat.com>,
"Kernel newbies" <kernelnewbies@nl.linux.org>, "micheal
williams" <michael_h_williamson@yahoo.com>
> Date: Friday, January 23, 2009, 7:14 AM
> Hello,   Actually what is mmap()?why it used?shall we
> write the program without that function?



The mmap() function makes the memory containing
the picture pixel data available to the program.

The alternative is to use the read() function,
to get the picture pixel data. I do not have
a program that does it that way. 

It is possible to get picture pixel data from a 
camera from the shell prompt like this:

   # head -c 304128 /dev/video0 > pict.raw

That does the same things as open() and 
read() functions do using a 'C' program.


-Mike







      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

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

* mmap()
@ 2009-01-23 13:14 niamathullah sharief
  0 siblings, 0 replies; 6+ messages in thread
From: niamathullah sharief @ 2009-01-23 13:14 UTC (permalink / raw)
  To: video4linux list, Kernel newbies, micheal williams

Hello,   Actually what is mmap()?why it used?shall we write the program without that function?


      Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

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

end of thread, other threads:[~2010-07-31  4:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-06 17:07 mmap() niamathullah sharief
2009-01-23 13:14 mmap() niamathullah sharief
     [not found] <787717.19693.qm@web65509.mail.ac4.yahoo.com>
2009-01-23 18:41 ` mmap() niamathullah sharief
     [not found] <596339.38105.qm@web65507.mail.ac4.yahoo.com>
2009-01-24  2:15 ` mmap() niamathullah sharief
     [not found] <568610.95410.qm@web65506.mail.ac4.yahoo.com>
2009-01-24 23:31 ` mmap() niamathullah sharief
2010-07-31  4:21 mmap() Manu Abraham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.