All of lore.kernel.org
 help / color / mirror / Atom feed
* how to get PFN of page cache?
@ 2014-03-20 11:44 pravin jadav
  2014-03-20 13:03 ` Pranay Srivastava
  2014-03-20 18:46 ` Valdis.Kletnieks at vt.edu
  0 siblings, 2 replies; 10+ messages in thread
From: pravin jadav @ 2014-03-20 11:44 UTC (permalink / raw)
  To: kernelnewbies

i want to develop linux kernel module that will get PFN of pagecache pages.
please help me how to develop this kind of kernel module.

-- 

pravin jadav
M.Tech (IT pursuing )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140320/5f4d1a71/attachment.html 

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

* how to get PFN of page cache?
  2014-03-20 11:44 how to get PFN of page cache? pravin jadav
@ 2014-03-20 13:03 ` Pranay Srivastava
  2014-03-20 17:24   ` pravin jadav
  2014-03-21  2:39   ` Chan Kim
  2014-03-20 18:46 ` Valdis.Kletnieks at vt.edu
  1 sibling, 2 replies; 10+ messages in thread
From: Pranay Srivastava @ 2014-03-20 13:03 UTC (permalink / raw)
  To: kernelnewbies

On Mar 20, 2014 5:22 PM, "pravin jadav" <pravin.jadav17@gmail.com> wrote:
>
> i want to develop linux kernel module that will get PFN of pagecache
pages.
> please help me how to develop this kind of kernel module.
>

See drop_pagecache_sb. What exactly you need??

I don't think you'll need to modify or access the memory defined by that
page.

So i guess you could do a lockless version when you iterate over pages.

> --
>
> pravin jadav
> M.Tech (IT pursuing )
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140320/8b23f0ec/attachment.html 

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

* how to get PFN of page cache?
  2014-03-20 13:03 ` Pranay Srivastava
@ 2014-03-20 17:24   ` pravin jadav
  2014-03-20 18:15     ` Pranay Srivastava
  2014-03-21  2:39   ` Chan Kim
  1 sibling, 1 reply; 10+ messages in thread
From: pravin jadav @ 2014-03-20 17:24 UTC (permalink / raw)
  To: kernelnewbies

just retrive want to  page frame number of pagecache page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140320/8ae81752/attachment.html 

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

* how to get PFN of page cache?
  2014-03-20 17:24   ` pravin jadav
@ 2014-03-20 18:15     ` Pranay Srivastava
  0 siblings, 0 replies; 10+ messages in thread
From: Pranay Srivastava @ 2014-03-20 18:15 UTC (permalink / raw)
  To: kernelnewbies

On 3/20/14, pravin jadav <pravin.jadav17@gmail.com> wrote:
> just retrive want to  page frame number of pagecache page
>

that's fine but anything specific you are looking for?
printing pfns only doesn't sound interesting. I hope there will be more to it.

-- 
Pranay Srivastava

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

* how to get PFN of page cache?
  2014-03-20 11:44 how to get PFN of page cache? pravin jadav
  2014-03-20 13:03 ` Pranay Srivastava
@ 2014-03-20 18:46 ` Valdis.Kletnieks at vt.edu
  2014-03-21  2:35   ` Chan Kim
  1 sibling, 1 reply; 10+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2014-03-20 18:46 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 20 Mar 2014 17:14:57 +0530, pravin jadav said:

> i want to develop linux kernel module that will get PFN of pagecache pages.
> please help me how to develop this kind of kernel module.

What do you intend to do with the page once you find its PFN?  It's quite
possible there's already an API to do what you want without even needing
its PFN - or good technical reasons to not do what your module intends to
do once it has the PFN....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140320/82cde030/attachment.bin 

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

* how to get PFN of page cache?
  2014-03-20 18:46 ` Valdis.Kletnieks at vt.edu
@ 2014-03-21  2:35   ` Chan Kim
  0 siblings, 0 replies; 10+ messages in thread
From: Chan Kim @ 2014-03-21  2:35 UTC (permalink / raw)
  To: kernelnewbies


There are some functions to probe (look into) the page tables (for current context.. maybe for all the conext too).
look under /arch/x86(yours)/mm.
This page table is in the memory so the S/W can probe it.
But I don't think we can see whan page table entries we have in the page descriptor cache (that's stored by the MMU hardware).
Chan

________________________________
>From : "Valdis.Kletnieks at vt.edu" <Valdis.Kletnieks@vt.edu>
Sent : 2014-03-21 03:49:36 ( +09:00 )
To : pravin jadav <pravin.jadav17@gmail.com>
Cc : Kernelnewbies at kernelnewbies.org <Kernelnewbies@kernelnewbies.org>
Subject : Re: how to get PFN of page cache?

On Thu, 20 Mar 2014 17:14:57 +0530, pravin jadav said:

> i want to develop linux kernel module that will get PFN of pagecache pages.
> please help me how to develop this kind of kernel module.

What do you intend to do with the page once you find its PFN? It's quite
possible there's already an API to do what you want without even needing
its PFN - or good technical reasons to not do what your module intends to
do once it has the PFN....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140321/892be5c8/attachment.html 

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

* how to get PFN of page cache?
  2014-03-20 13:03 ` Pranay Srivastava
  2014-03-20 17:24   ` pravin jadav
@ 2014-03-21  2:39   ` Chan Kim
  2014-03-21  4:08     ` pravin jadav
  1 sibling, 1 reply; 10+ messages in thread
From: Chan Kim @ 2014-03-21  2:39 UTC (permalink / raw)
  To: kernelnewbies


Pravin,
I think Pravin wants to know the Page Frame Number in memory management.(virtual<->physical conversion)
But the function drop_pagecache_sb seems to be about the disk cache(file magement or block layer).
Chan
________________________________
>From : "Pranay Srivastava" <pranjas@gmail.com>
Sent : 2014-03-20 22:05:30 ( +09:00 )
To : pravin jadav <pravin.jadav17@gmail.com>
Cc : Kernelnewbies at kernelnewbies.org <Kernelnewbies@kernelnewbies.org>
Subject : Re: how to get PFN of page cache?


On Mar 20, 2014 5:22 PM, "pravin jadav" <pravin.jadav17 at gmail.com<mailto:pravin.jadav17@gmail.com>> wrote:
>
> i want to develop linux kernel module that will get PFN of pagecache pages.
> please help me how to develop this kind of kernel module.
>

See drop_pagecache_sb. What exactly you need??

I don't think you'll need to modify or access the memory defined by that page.

So i guess you could do a lockless version when you iterate over pages.

> --
>
> pravin jadav
> M.Tech (IT pursuing )
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org<mailto:Kernelnewbies@kernelnewbies.org>
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140321/f6d7dd6f/attachment-0001.html 

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

* how to get PFN of page cache?
  2014-03-21  2:39   ` Chan Kim
@ 2014-03-21  4:08     ` pravin jadav
  2014-03-21  4:17       ` 김찬
  0 siblings, 1 reply; 10+ messages in thread
From: pravin jadav @ 2014-03-21  4:08 UTC (permalink / raw)
  To: kernelnewbies

basically i need to develop kernel module that get PFN of page cache and is
corresponding disk block number.

after getting PFN and Disk block number, user space program transfer PFN
and Disk blick number to the source VMM and remote VMM.

i use that module in virtual machine(VM) live migration.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140321/d6e661d9/attachment.html 

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

* how to get PFN of page cache?
  2014-03-21  4:08     ` pravin jadav
@ 2014-03-21  4:17       ` 김찬
  2014-03-21  4:29         ` pravin jadav
  0 siblings, 1 reply; 10+ messages in thread
From: 김찬 @ 2014-03-21  4:17 UTC (permalink / raw)
  To: kernelnewbies

Oh, I see.
By PFN of page cache, do you mean the one in the memory management unit? Or is there another page cache for the disk cache(I?m not sure if there?s one)?
-----------------------
From: pravin jadav [mailto:pravin.jadav17 at gmail.com] 
Sent: Friday, March 21, 2014 1:08 PM
To: ??; Valdis Kletnieks
Cc: Pranay Srivastava; Kernelnewbies at kernelnewbies.org
Subject: Re: how to get PFN of page cache?

basically i need to develop kernel module that get PFN of page cache and is corresponding disk block number.

after getting PFN and Disk block number, user space program transfer PFN and Disk blick number to the source VMM and remote VMM.?

i use that module in virtual machine(VM) live migration.

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

* how to get PFN of page cache?
  2014-03-21  4:17       ` 김찬
@ 2014-03-21  4:29         ` pravin jadav
  0 siblings, 0 replies; 10+ messages in thread
From: pravin jadav @ 2014-03-21  4:29 UTC (permalink / raw)
  To: kernelnewbies

page cache that are use in the memory management unit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140321/c550f817/attachment.html 

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

end of thread, other threads:[~2014-03-21  4:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-20 11:44 how to get PFN of page cache? pravin jadav
2014-03-20 13:03 ` Pranay Srivastava
2014-03-20 17:24   ` pravin jadav
2014-03-20 18:15     ` Pranay Srivastava
2014-03-21  2:39   ` Chan Kim
2014-03-21  4:08     ` pravin jadav
2014-03-21  4:17       ` 김찬
2014-03-21  4:29         ` pravin jadav
2014-03-20 18:46 ` Valdis.Kletnieks at vt.edu
2014-03-21  2:35   ` Chan Kim

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.