Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1463367
| From | js1304@gmail.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/6] mm/page_ext: rename offset to index |
| Date | 2016-08-16 05:00 +0200 |
| Message-ID | <s6CLE-5JI-21@gated-at.bofh.it> (permalink) |
| References | <s6CLD-5JI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Here, 'offset' means entry index in page_ext array. Following patch
will use 'offset' for field offset in each entry so rename current
'offset' to prevent confusion.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
mm/page_ext.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/page_ext.c b/mm/page_ext.c
index 44a4c02..1629282 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -102,7 +102,7 @@ void __meminit pgdat_page_ext_init(struct pglist_data *pgdat)
struct page_ext *lookup_page_ext(struct page *page)
{
unsigned long pfn = page_to_pfn(page);
- unsigned long offset;
+ unsigned long index;
struct page_ext *base;
base = NODE_DATA(page_to_nid(page))->node_page_ext;
@@ -119,9 +119,9 @@ struct page_ext *lookup_page_ext(struct page *page)
if (unlikely(!base))
return NULL;
#endif
- offset = pfn - round_down(node_start_pfn(page_to_nid(page)),
+ index = pfn - round_down(node_start_pfn(page_to_nid(page)),
MAX_ORDER_NR_PAGES);
- return base + offset;
+ return base + index;
}
static int __init alloc_node_page_ext(int nid)
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/6] Reduce memory waste by page extension user js1304@gmail.com - 2016-08-16 05:00 +0200
[PATCH v2 2/6] mm/debug_pagealloc: don't allocate page_ext if we don't use guard page js1304@gmail.com - 2016-08-16 05:00 +0200
[PATCH v2 5/6] mm/page_ext: support extra space allocation by page_ext user js1304@gmail.com - 2016-08-16 05:00 +0200
Re: [PATCH v2 5/6] mm/page_ext: support extra space allocation by page_ext user Vlastimil Babka <vbabka@suse.cz> - 2016-08-16 09:30 +0200
[PATCH v2 4/6] mm/page_ext: rename offset to index js1304@gmail.com - 2016-08-16 05:00 +0200
Re: [PATCH v2 4/6] mm/page_ext: rename offset to index Vlastimil Babka <vbabka@suse.cz> - 2016-08-16 09:30 +0200
[PATCH v2 1/6] mm/debug_pagealloc: clean-up guard page handling code js1304@gmail.com - 2016-08-16 05:00 +0200
[PATCH v2 3/6] mm/page_owner: move page_owner specific function to page_owner.c js1304@gmail.com - 2016-08-16 05:00 +0200
Re: [PATCH v2 0/6] Reduce memory waste by page extension user Michal Hocko <mhocko@kernel.org> - 2016-08-16 12:00 +0200
Re: [PATCH v2 0/6] Reduce memory waste by page extension user Michal Hocko <mhocko@kernel.org> - 2016-08-16 12:20 +0200
csiph-web