Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1295063 > unrolled thread
| Started by | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| First post | 2015-12-18 18:30 +0100 |
| Last post | 2015-12-21 11:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] mm/readahead.c, mm/vmscan.c: use lru_to_page instead of list_to_page Vlastimil Babka <vbabka@suse.cz> - 2015-12-18 18:30 +0100
[PATCH] mm: move lru_to_page to mm_inline.h Geliang Tang <geliangtang@163.com> - 2015-12-19 10:20 +0100
Re: [PATCH] mm: move lru_to_page to mm_inline.h Vlastimil Babka <vbabka@suse.cz> - 2015-12-21 11:20 +0100
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Date | 2015-12-18 18:30 +0100 |
| Subject | Re: [PATCH] mm/readahead.c, mm/vmscan.c: use lru_to_page instead of list_to_page |
| Message-ID | <qH70T-8A-25@gated-at.bofh.it> |
On 12/08/2015 03:40 PM, Geliang Tang wrote: > list_to_page() in readahead.c is the same as lru_to_page() in vmscan.c. > So I move lru_to_page to internal.h and drop list_to_page(). Looks like this would topically fit better to include/linux/mm_inline.h Vlastimil -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-19 10:20 +0100 |
| Subject | [PATCH] mm: move lru_to_page to mm_inline.h |
| Message-ID | <qHlQd-1iV-3@gated-at.bofh.it> |
| In reply to | #1295063 |
Move lru_to_page() from internal.h to mm_inline.h. Signed-off-by: Geliang Tang <geliangtang@163.com> --- include/linux/mm_inline.h | 2 ++ mm/internal.h | 2 -- mm/readahead.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index cf55945..712e8c3 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -100,4 +100,6 @@ static __always_inline enum lru_list page_lru(struct page *page) return lru; } +#define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) + #endif diff --git a/mm/internal.h b/mm/internal.h index ca49922..5d8ec89 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -87,8 +87,6 @@ extern int isolate_lru_page(struct page *page); extern void putback_lru_page(struct page *page); extern bool zone_reclaimable(struct zone *zone); -#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru)) - /* * in mm/rmap.c: */ diff --git a/mm/readahead.c b/mm/readahead.c index 0aff760..20e58e8 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -17,6 +17,7 @@ #include <linux/pagemap.h> #include <linux/syscalls.h> #include <linux/file.h> +#include <linux/mm_inline.h> #include "internal.h" -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Date | 2015-12-21 11:20 +0100 |
| Subject | Re: [PATCH] mm: move lru_to_page to mm_inline.h |
| Message-ID | <qI5Jn-5ac-1@gated-at.bofh.it> |
| In reply to | #1295332 |
On 12/19/2015 10:08 AM, Geliang Tang wrote: > Move lru_to_page() from internal.h to mm_inline.h. The file already contains functionality related to lru. > Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> > --- > include/linux/mm_inline.h | 2 ++ > mm/internal.h | 2 -- > mm/readahead.c | 1 + > 3 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h > index cf55945..712e8c3 100644 > --- a/include/linux/mm_inline.h > +++ b/include/linux/mm_inline.h > @@ -100,4 +100,6 @@ static __always_inline enum lru_list page_lru(struct page *page) > return lru; > } > > +#define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) > + > #endif > diff --git a/mm/internal.h b/mm/internal.h > index ca49922..5d8ec89 100644 > --- a/mm/internal.h > +++ b/mm/internal.h > @@ -87,8 +87,6 @@ extern int isolate_lru_page(struct page *page); > extern void putback_lru_page(struct page *page); > extern bool zone_reclaimable(struct zone *zone); > > -#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru)) > - > /* > * in mm/rmap.c: > */ > diff --git a/mm/readahead.c b/mm/readahead.c > index 0aff760..20e58e8 100644 > --- a/mm/readahead.c > +++ b/mm/readahead.c > @@ -17,6 +17,7 @@ > #include <linux/pagemap.h> > #include <linux/syscalls.h> > #include <linux/file.h> > +#include <linux/mm_inline.h> > > #include "internal.h" > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web