Release 4.10 include/linux/mm_inline.h
#ifndef LINUX_MM_INLINE_H
#define LINUX_MM_INLINE_H
#include <linux/huge_mm.h>
#include <linux/swap.h>
/**
* page_is_file_cache - should the page be on a file LRU or anon LRU?
* @page: the page to test
*
* Returns 1 if @page is page cache page backed by a regular filesystem,
* or 0 if @page is anonymous, tmpfs or otherwise ram or swap backed.
* Used by functions that manipulate the LRU lists, to sort a page
* onto the right LRU list.
*
* We would like to get this info without a page flag, but the state
* needs to survive until the page is last deleted from the LRU, which
* could be as far down as __page_cache_release.
*/
static inline int page_is_file_cache(struct page *page)
{
return !PageSwapBacked(page);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rik van riel | rik van riel | 17 | 89.47% | 1 | 50.00% |
johannes weiner | johannes weiner | 2 | 10.53% | 1 | 50.00% |
| Total | 19 | 100.00% | 2 | 100.00% |
static __always_inline void __update_lru_size(struct lruvec *lruvec,
enum lru_list lru, enum zone_type zid,
int nr_pages)
{
struct pglist_data *pgdat = lruvec_pgdat(lruvec);
__mod_node_page_state(pgdat, NR_LRU_BASE + lru, nr_pages);
__mod_zone_page_state(&pgdat->node_zones[zid],
NR_ZONE_LRU_BASE + lru, nr_pages);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hugh dickins | hugh dickins | 30 | 49.18% | 1 | 33.33% |
minchan kim | minchan kim | 17 | 27.87% | 1 | 33.33% |
mel gorman | mel gorman | 14 | 22.95% | 1 | 33.33% |
| Total | 61 | 100.00% | 3 | 100.00% |
static __always_inline void update_lru_size(struct lruvec *lruvec,
enum lru_list lru, enum zone_type zid,
int nr_pages)
{
__update_lru_size(lruvec, lru, zid, nr_pages);
#ifdef CONFIG_MEMCG
mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages);
#endif
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hugh dickins | hugh dickins | 37 | 74.00% | 1 | 25.00% |
mel gorman | mel gorman | 11 | 22.00% | 2 | 50.00% |
michal hocko | michal hocko | 2 | 4.00% | 1 | 25.00% |
| Total | 50 | 100.00% | 4 | 100.00% |
static __always_inline void add_page_to_lru_list(struct page *page,
struct lruvec *lruvec, enum lru_list lru)
{
update_lru_size(lruvec, lru, page_zonenum(page), hpage_nr_pages(page));
list_add(&page->lru, &lruvec->lists[lru]);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andrew morton | andrew morton | 20 | 37.04% | 1 | 12.50% |
hugh dickins | hugh dickins | 15 | 27.78% | 3 | 37.50% |
johannes weiner | johannes weiner | 10 | 18.52% | 1 | 12.50% |
mel gorman | mel gorman | 5 | 9.26% | 1 | 12.50% |
christoph lameter | christoph lameter | 3 | 5.56% | 1 | 12.50% |
konstantin khlebnikov | konstantin khlebnikov | 1 | 1.85% | 1 | 12.50% |
| Total | 54 | 100.00% | 8 | 100.00% |
static __always_inline void del_page_from_lru_list(struct page *page,
struct lruvec *lruvec, enum lru_list lru)
{
list_del(&page->lru);
update_lru_size(lruvec, lru, page_zonenum(page), -hpage_nr_pages(page));
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hugh dickins | hugh dickins | 23 | 48.94% | 4 | 40.00% |
andrea arcangeli | andrea arcangeli | 12 | 25.53% | 1 | 10.00% |
mel gorman | mel gorman | 5 | 10.64% | 1 | 10.00% |
andrew morton | andrew morton | 4 | 8.51% | 1 | 10.00% |
johannes weiner | johannes weiner | 1 | 2.13% | 1 | 10.00% |
christoph lameter | christoph lameter | 1 | 2.13% | 1 | 10.00% |
konstantin khlebnikov | konstantin khlebnikov | 1 | 2.13% | 1 | 10.00% |
| Total | 47 | 100.00% | 10 | 100.00% |
/**
* page_lru_base_type - which LRU list type should a page be on?
* @page: the page to test
*
* Used for LRU list index arithmetic.
*
* Returns the base LRU type - file or anon - @page should be on.
*/
static inline enum lru_list page_lru_base_type(struct page *page)
{
if (page_is_file_cache(page))
return LRU_INACTIVE_FILE;
return LRU_INACTIVE_ANON;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
johannes weiner | johannes weiner | 26 | 100.00% | 1 | 100.00% |
| Total | 26 | 100.00% | 1 | 100.00% |
/**
* page_off_lru - which LRU list was page on? clearing its lru flags.
* @page: the page to test
*
* Returns the LRU list a page was on, as an index into the array of LRU
* lists; and clears its Unevictable or Active flags, ready for freeing.
*/
static __always_inline enum lru_list page_off_lru(struct page *page)
{
enum lru_list lru;
if (PageUnevictable(page)) {
__ClearPageUnevictable(page);
lru = LRU_UNEVICTABLE;
} else {
lru = page_lru_base_type(page);
if (PageActive(page)) {
__ClearPageActive(page);
lru += LRU_ACTIVE;
}
}
return lru;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
andrew morton | andrew morton | 21 | 31.82% | 1 | 11.11% |
lee schermerhorn | lee schermerhorn | 20 | 30.30% | 1 | 11.11% |
hugh dickins | hugh dickins | 10 | 15.15% | 2 | 22.22% |
christoph lameter | christoph lameter | 6 | 9.09% | 1 | 11.11% |
johannes weiner | johannes weiner | 6 | 9.09% | 1 | 11.11% |
konstantin khlebnikov | konstantin khlebnikov | 1 | 1.52% | 1 | 11.11% |
rik van riel | rik van riel | 1 | 1.52% | 1 | 11.11% |
nick piggin | nick piggin | 1 | 1.52% | 1 | 11.11% |
| Total | 66 | 100.00% | 9 | 100.00% |
/**
* page_lru - which LRU list should a page be on?
* @page: the page to test
*
* Returns the LRU list a page should be on, as an index
* into the array of LRU lists.
*/
static __always_inline enum lru_list page_lru(struct page *page)
{
enum lru_list lru;
if (PageUnevictable(page))
lru = LRU_UNEVICTABLE;
else {
lru = page_lru_base_type(page);
if (PageActive(page))
lru += LRU_ACTIVE;
}
return lru;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
christoph lameter | christoph lameter | 27 | 51.92% | 2 | 33.33% |
lee schermerhorn | lee schermerhorn | 14 | 26.92% | 1 | 16.67% |
johannes weiner | johannes weiner | 7 | 13.46% | 1 | 16.67% |
andrew morton | andrew morton | 3 | 5.77% | 1 | 16.67% |
konstantin khlebnikov | konstantin khlebnikov | 1 | 1.92% | 1 | 16.67% |
| Total | 52 | 100.00% | 6 | 100.00% |
#define lru_to_page(head) (list_entry((head)->prev, struct page, lru))
#endif
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hugh dickins | hugh dickins | 116 | 29.00% | 5 | 20.83% |
johannes weiner | johannes weiner | 54 | 13.50% | 3 | 12.50% |
andrew morton | andrew morton | 48 | 12.00% | 1 | 4.17% |
christoph lameter | christoph lameter | 38 | 9.50% | 2 | 8.33% |
mel gorman | mel gorman | 35 | 8.75% | 2 | 8.33% |
lee schermerhorn | lee schermerhorn | 34 | 8.50% | 1 | 4.17% |
rik van riel | rik van riel | 29 | 7.25% | 3 | 12.50% |
minchan kim | minchan kim | 17 | 4.25% | 1 | 4.17% |
andrea arcangeli | andrea arcangeli | 12 | 3.00% | 1 | 4.17% |
geliang tang | geliang tang | 7 | 1.75% | 1 | 4.17% |
konstantin khlebnikov | konstantin khlebnikov | 4 | 1.00% | 1 | 4.17% |
lisa du | lisa du | 3 | 0.75% | 1 | 4.17% |
michal hocko | michal hocko | 2 | 0.50% | 1 | 4.17% |
nick piggin | nick piggin | 1 | 0.25% | 1 | 4.17% |
| Total | 400 | 100.00% | 24 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.