diff options
author | Petr Tesarik <ptesarik@suse.cz> | 2012-10-31 16:12:47 +0900 |
---|---|---|
committer | Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> | 2013-02-06 13:40:56 +0900 |
commit | 0aff0e5174d0708bf1bfb039ab863e1fea8a1029 (patch) | |
tree | 1e71b111c5594b027f0aafbbdf7819ba45985db9 /cache.h | |
parent | 5d83960cad23b2e7b9012d85d2cbd183ef026837 (diff) |
[PATCH] keep dumpfile pages in a cache.
Add a simple cache for pages read from the dumpfile.
This is a big win if we read consecutive data from one page, e.g.
page descriptors, or even page table entries.
Note that makedumpfile now always reads a complete page. This was already
the case with kdump-compressed and sadump formats, but makedumpfile was
throwing most of the data away. For the kdump-compressed case, we may
actually save a lot of decompression, too.
I tried to keep the cache small to minimize memory footprint, but it should
be big enough to hold all pages to do 4-level paging plus some data. This
is needed e.g. for vmalloc areas or Xen page frame table data, which are not
contiguous in physical memory.
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +/* + * cache.h + * + * Written by: Petr Tesarik <ptesarik@suse.cz> + * + * Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _CACHE_H +#define _CACHE_H + +void *cache_search(unsigned long long paddr); +void *cache_alloc(unsigned long long paddr); +void cache_add(unsigned long long paddr); + +#endif /* _CACHE_H */ |