* page locking in PowerPC cores
@ 2006-07-18 11:03 Parav Pandit
2006-07-18 23:35 ` Eugene Surovegin
0 siblings, 1 reply; 4+ messages in thread
From: Parav Pandit @ 2006-07-18 11:03 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
Hi,
We allocate memory for DMA operation on PCI device using pci_alloc_constistent().
I want to know how this function is boil down to the actual instruction which locks the page in the RAM so that it cannot be paged out and dma can do its work.
Can anybody tell me which instructions do we use to set this page entry in TLB and page table?
What bit gets set in the PTE for this?
Regards,
Parav Pandit
---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
[-- Attachment #2: Type: text/html, Size: 784 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: page locking in PowerPC cores
2006-07-18 11:03 page locking in PowerPC cores Parav Pandit
@ 2006-07-18 23:35 ` Eugene Surovegin
2006-07-19 4:45 ` Parav Pandit
0 siblings, 1 reply; 4+ messages in thread
From: Eugene Surovegin @ 2006-07-18 23:35 UTC (permalink / raw)
To: Parav Pandit; +Cc: linuxppc-embedded
On Tue, Jul 18, 2006 at 04:03:50AM -0700, Parav Pandit wrote:
> Hi,
>
> We allocate memory for DMA operation on PCI device using pci_alloc_constistent().
>
> I want to know how this function is boil down to the actual instruction which locks the page in the RAM so that it cannot be paged out and dma can do its work.
This is trivial - you can start with looking at the implementation.
>
> Can anybody tell me which instructions do we use to set this page entry in TLB and page table?
> What bit gets set in the PTE for this?
Why do you need this page in TLB?
In general you don't have to worry about _any_ memory you allocated in
the kernel to be paged out.
--
Eugene
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: page locking in PowerPC cores
2006-07-18 23:35 ` Eugene Surovegin
@ 2006-07-19 4:45 ` Parav Pandit
2006-07-20 18:50 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Parav Pandit @ 2006-07-19 4:45 UTC (permalink / raw)
To: Eugene Surovegin; +Cc: linuxppc-embedded
--- Eugene Surovegin <ebs@ebshome.net> wrote:
> > We allocate memory for DMA operation on PCI
> device using pci_alloc_constistent().
> >
> > I want to know how this function is boil down to
> the actual instruction which locks the page in the
> RAM so that it cannot be paged out and dma can do
> its work.
>
> This is trivial - you can start with looking at the
> implementation.
>
[Parav]
I did it, but after reaching __alloc_pages() its
getting difficult to understand.
Here is the sequence:
pci_alloc_consistent()
-> __get_free_pages()
->alloc_pages(gfp_mask, order)
->alloc_pages_current()
-> __alloc_pages()
It does something with zones. Looks like zone memory
pages are locked in the beginning.
Still could not figure out the instuctions for page
locking.
> >
> > Can anybody tell me which instructions do we use
> to set this page entry in TLB and page table?
> > What bit gets set in the PTE for this?
>
> Why do you need this page in TLB?
[Parav] No, I don't want. I just wanted to see the
code for locking inside TLB or in page table.
>
> In general you don't have to worry about _any_
> memory you allocated in
> the kernel to be paged out.
>
[Parav] As driver writer, I agree I don't need to, but
to better understand the system I am eager to do that.
Regards,
Parav
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: page locking in PowerPC cores
2006-07-19 4:45 ` Parav Pandit
@ 2006-07-20 18:50 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-07-20 18:50 UTC (permalink / raw)
To: Parav Pandit; +Cc: linuxppc-embedded
Only memory mapped into userland contexts can be paged out in the first
place.
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-20 18:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-18 11:03 page locking in PowerPC cores Parav Pandit
2006-07-18 23:35 ` Eugene Surovegin
2006-07-19 4:45 ` Parav Pandit
2006-07-20 18:50 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).