Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19c52b5f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm, compaction: use free lists to quickly locate a migration target"

parents c7893df0 aa32e506
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -120,12 +120,6 @@ static inline u64 ptr_to_u64(const void *ptr)

#include <linux/list.h>

static inline int list_is_first(const struct list_head *list,
				const struct list_head *head)
{
	return head->next == list;
}

static inline void __list_del_many(struct list_head *head,
				   struct list_head *first)
{
+11 −0
Original line number Diff line number Diff line
@@ -183,6 +183,17 @@ static inline void list_move_tail(struct list_head *list,
	list_add_tail(list, head);
}

/**
 * list_is_first -- tests whether @ list is the first entry in list @head
 * @list: the entry to test
 * @head: the head of the list
 */
static inline int list_is_first(const struct list_head *list,
					const struct list_head *head)
{
	return list->prev == head;
}

/**
 * list_is_last - tests whether @list is the last entry in list @head
 * @list: the entry to test
+491 −40

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -207,9 +207,11 @@ struct compact_control {
	unsigned int nr_migratepages;	/* Number of pages to migrate */
	unsigned long free_pfn;		/* isolate_freepages search base */
	unsigned long migrate_pfn;	/* isolate_migratepages search base */
	unsigned long fast_start_pfn;	/* a pfn to start linear scan from */
	struct zone *zone;
	unsigned long total_migrate_scanned;
	unsigned long total_free_scanned;
	unsigned int fast_search_fail;	/* failures to use free list searches */
	const gfp_t gfp_mask;		/* gfp mask of a direct compactor */
	int order;			/* order a direct compactor needs */
	int migratetype;		/* migratetype of direct compactor */
@@ -222,7 +224,6 @@ struct compact_control {
	bool direct_compaction;		/* False from kcompactd or /proc/... */
	bool whole_zone;		/* Whole zone should/has been scanned */
	bool contended;			/* Signal lock or sched contention */
	bool finishing_block;		/* Finishing current pageblock */
};

unsigned long
+1 −1
Original line number Diff line number Diff line
@@ -899,7 +899,7 @@ static int fallback_migrate_page(struct address_space *mapping,
	 */
	if (page_has_private(page) &&
	    !try_to_release_page(page, GFP_KERNEL))
		return -EAGAIN;
		return mode == MIGRATE_SYNC ? -EAGAIN : -EBUSY;

	return migrate_page(mapping, newpage, page, mode);
}
Loading