Skip to contentSkip to conversation

struct page: page in use or not ?

parisc-linux [email protected] 4 participants 6 messages Mar 19, 2003 – Mar 20, 2003

lore
Share & tools
lore
#0 lore raw

Hi
I'm currently trying to reduce the dump time, and then I try to dump only pages that are currently use by the system. In page structure I found a flag, I was thinking a good one for this purpose:
atomic_t count; /* Usage count, see below. */

But after taking only pages where count != 0, something was broken, I was not able to look at proc structure, and several things.....
If a do a "full" dump I'm still able to look at what I need, so this page.count is not accurate for this purpose. So does't exist a good way to know if a page is in use or not ?

thanks.

--
Vidal Bruno, (770-4271)
SSD-HA Team, HP-UX & LINUX Support
[email protected]

begin:vcard
n:Bruno;VIDAL
tel;fax:01-69-82-60-14
tel;work:01-69-29-42-71
x-mozilla-html:TRUE
url:www.france.hp.com
org:Solution Center
version:2.1
email;internet:[email protected]
title:Expert Logiciel Environnement Haute Disponibilité
adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France x-mozilla-cpt:;26208
fn:VIDAL Bruno
end:vcard

#1 lore raw
Quoted 4 lines

I'm currently trying to reduce the dump time, and then I try to dump only pages that are currently use by the system. In page structure I found a flag, I was thinking a good one for this purpose:
atomic_t count; /* Usage count, see below. */

Bruno, isn't this handled in the generic dump code? I haven't looked at this for a while, but I thought the generic dump code lets you configure whether to dump all kernel pages, all kernel+user referened pages or all pages whether referenced or not...

randolph

Signature · 3 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
#2 lore raw
In reply to [email protected]
Quoted 11 lines · On Wed, Mar 19, 2003 at 05:50:46PM +0100, [email protected] wrote:

Hi
I'm currently trying to reduce the dump time, and then I try to dump only pages that are currently use by the system. In page structure I found a flag, I was thinking a good one for this purpose:
atomic_t count; /* Usage count, see below. */

But after taking only pages where count != 0, something was broken, I was not able to look at proc structure, and several things.....
If a do a "full" dump I'm still able to look at what I need, so this page.count is not accurate for this purpose. So does't exist a good way to know if a page is in use or not ?

The problem is multi-page allocs. The `struct page' is not valid for those. I'm not sure what a good way of doing this is -- have you looked at the swsusp patches to see how they do it?

Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
#3 lore raw

Hi
What do you mean by "swsusp" patche ? What it do.... Actually I'm looking at the kmalloc() function in order to understand how it determine the bucket, and so to know which pages I need to dump before I can use the page structure. Do you think it is a good starting point, or using page struture is really a bad option ?

Thanks.

Quoted 17 lines · Matthew Wilcox
Quoted 11 lines · On Wed, Mar 19, 2003 at 05:50:46PM +0100, [email protected] wrote:

Hi
I'm currently trying to reduce the dump time, and then I try to dump only pages that are currently use by the system. In page structure I found a flag, I was thinking a good one for this purpose:
atomic_t count; /* Usage count, see below. */

But after taking only pages where count != 0, something was broken, I was not able to look at proc structure, and several things.....
If a do a "full" dump I'm still able to look at what I need, so this page.count is not accurate for this purpose. So does't exist a good way to know if a page is in use or not ?

The problem is multi-page allocs. The `struct page' is not valid for those. I'm not sure what a good way of doing this is -- have you looked at the swsusp patches to see how they do it?

Quoted 8 lines

--
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

--
Vidal Bruno, (770-4271)
SSD-HA Team, HP-UX & LINUX Support
[email protected]

begin:vcard
n:Bruno;VIDAL
tel;fax:01-69-82-60-14
tel;work:01-69-29-42-71
x-mozilla-html:TRUE
url:www.france.hp.com
org:Solution Center
version:2.1
email;internet:[email protected]
title:Expert Logiciel Environnement Haute Disponibilité
adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France x-mozilla-cpt:;26208
fn:VIDAL Bruno
end:vcard

#4 lore raw
Quoted 7 lines · On Thu, Mar 20, 2003 at 12:23:08PM +0100, [email protected] wrote:

Hi
What do you mean by "swsusp" patche ? What it do.... Actually I'm looking at the kmalloc() function in order to understand how it determine the bucket, and so to know which pages I need to dump before I can use the page structure. Do you think it is a good starting point, or using page struture is really a bad option ?

kmalloc (ie slab) is the wrong allocator to be looking at. you want get_free_pages.

Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
#5 lore raw
In reply to [email protected]
Quoted 2 lines · On Thu, Mar 20, 2003 at 12:23:08PM +0100, [email protected] wrote:

Hi
What do you mean by "swsusp" patche ? What it do....

swsusp = Software Suspend

http://fchabaud.free.fr/English/default.php3?COUNT=3&FILE0=Tricks&FILE1=Laptop&FILE2=Swsusp

Software suspend is a kernel patch that provides the ability to suspend execution of the kernel without using any APM BIOS feature. This is really useful either if your BIOS is broken (for instance you have bought a larger disk than the original one and the BIOS is unable to handle it :-() or if you frequently swap from windows to linux because this feature allows you to save your linux session on disk instead of rebooting.

Signature · 1 line
Michael Wood <[email protected]>