Re: [RFC v3][PATCH 4/9] Memory management (dump)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dave Hansen
Date: Thursday, September 4, 2008 - 11:25 am

On Thu, 2008-09-04 at 04:03 -0400, Oren Laadan wrote:

What we effectively have here is:

void *addrs[CR_PGARR_TOTAL];
void *pages[CR_PGARR_TOTAL];

right?

Would any of this get simpler if we just had:

struct cr_page {
	struct page *page;
	unsigned long vaddr;
};

struct cr_pgarr {
       struct cr_page *cr_pages;
       struct cr_pgarr *next;
       unsigned short nleft;
       unsigned short nused;
};

Also, we do have lots of linked list implementations in the kernel.
They do lots of fun stuff like poisoning and checking for
initialization.  We should use them instead of rolling our own.  It lets
us do other fun stuff like list_for_each().

Also, just looking at this structure 'nleft' and 'nused' sound a bit
redundant.  I know from looking at the code that this is how many have
been filled and read back at restore time, but that is not very obvious
looking at the structure.  I think we can do a bit better in the
structure itself.

The length of the arrays is fixed at compile-time, right?  Should we
just make that explicit as well?  

-- Dave

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC v3][PATCH 0/9] Kernel based checkpoint/restart, Oren Laadan, (Thu Sep 4, 12:57 am)
[RFC v3][PATCH 4/9] Memory management (dump), Oren Laadan, (Thu Sep 4, 1:03 am)
[RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Thu Sep 4, 1:04 am)
[RFC v3][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Thu Sep 4, 1:05 am)
[RFC v3][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Thu Sep 4, 1:06 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Louis Rilling, (Thu Sep 4, 2:47 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Thu Sep 4, 7:43 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Dave Hansen, (Thu Sep 4, 8:01 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Thu Sep 4, 11:08 am)
Re: [RFC v3][PATCH 4/9] Memory management (dump), Dave Hansen, (Thu Sep 4, 11:25 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Dave Hansen, (Thu Sep 4, 11:41 am)
Re: [RFC v3][PATCH 4/9] Memory management (dump), Oren Laadan, (Sat Sep 6, 6:54 pm)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Sat Sep 6, 8:09 pm)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Sat Sep 6, 9:52 pm)
Re: [RFC v3][PATCH 4/9] Memory management (dump), Dave Hansen, (Mon Sep 8, 8:55 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Mon Sep 8, 9:49 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Dave Hansen, (Mon Sep 8, 9:57 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Mon Sep 8, 11:01 pm)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 2:42 pm)
Cleanups for: [PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 3:00 pm)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Thu Sep 11, 12:37 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Serge E. Hallyn, (Thu Sep 11, 8:38 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Fri Sep 12, 9:34 am)