Skip to content

Commit

Permalink
kernel: bump 6.0 to 6.0.11 (coolsnowwolf#10556)
Browse files Browse the repository at this point in the history
Manually rebased:
	hack-6.0/645-netfilter-connmark-introduce-set-dscpmark.patch[1]

All other patches automatically rebased

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Co-authored-by: John Audia <therealgraysky@proton.me>
  • Loading branch information
misaka36 and graysky2 authored Dec 6, 2022
1 parent a653ef5 commit 944341a
Show file tree
Hide file tree
Showing 26 changed files with 128 additions and 127 deletions.
4 changes: 2 additions & 2 deletions include/kernel-6.0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.0 = .10
LINUX_KERNEL_HASH-6.0.10 = 39e57fcd84cd70bfa3e1a4185d3aa0ed7f1432f24c6548d16326b0c3c9541dd0
LINUX_VERSION-6.0 = .11
LINUX_KERNEL_HASH-6.0.11 = 2bae6131e64971e1e34ff395fa542971134c857bdb0b29069ab847c7c9a9c762
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04

--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2728,6 +2728,109 @@ enum scan_balance {
@@ -2740,6 +2740,109 @@ enum scan_balance {
SCAN_FILE,
};

Expand Down Expand Up @@ -141,7 +141,7 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04
/*
* Determine how aggressively the anon and file LRU lists should be
* scanned.
@@ -3197,109 +3300,16 @@ static void shrink_node(pg_data_t *pgdat
@@ -3207,109 +3310,16 @@ static void shrink_node(pg_data_t *pgdat
unsigned long nr_reclaimed, nr_scanned;
struct lruvec *target_lruvec;
bool reclaimable = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7
folio_get(folio);
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3050,6 +3050,81 @@ static bool can_age_anon_pages(struct pg
@@ -3062,6 +3062,81 @@ static bool can_age_anon_pages(struct pg
return can_demote(pgdat->node_id, sc);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
__delete_from_swap_cache(folio, swap, shadow);
xa_unlock_irq(&mapping->i_pages);
put_swap_page(&folio->page, swap);
@@ -2733,6 +2735,9 @@ static void prepare_scan_count(pg_data_t
@@ -2745,6 +2747,9 @@ static void prepare_scan_count(pg_data_t
unsigned long file;
struct lruvec *target_lruvec;

Expand All @@ -436,7 +436,7 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
target_lruvec = mem_cgroup_lruvec(sc->target_mem_cgroup, pgdat);

/*
@@ -3056,6 +3061,17 @@ static bool can_age_anon_pages(struct pg
@@ -3068,6 +3073,17 @@ static bool can_age_anon_pages(struct pg
* shorthand helpers
******************************************************************************/

Expand All @@ -454,7 +454,7 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
#define for_each_gen_type_zone(gen, type, zone) \
for ((gen) = 0; (gen) < MAX_NR_GENS; (gen)++) \
for ((type) = 0; (type) < ANON_AND_FILE; (type)++) \
@@ -3081,6 +3097,745 @@ static struct lruvec __maybe_unused *get
@@ -3093,6 +3109,745 @@ static struct lruvec __maybe_unused *get
return pgdat ? &pgdat->__lruvec : NULL;
}

Expand Down Expand Up @@ -1200,7 +1200,7 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
/******************************************************************************
* initialization
******************************************************************************/
@@ -3123,6 +3878,16 @@ static int __init init_lru_gen(void)
@@ -3135,6 +3890,16 @@ static int __init init_lru_gen(void)
};
late_initcall(init_lru_gen);

Expand All @@ -1217,9 +1217,9 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
#endif /* CONFIG_LRU_GEN */

static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
@@ -3136,6 +3901,11 @@ static void shrink_lruvec(struct lruvec
@@ -3148,6 +3913,11 @@ static void shrink_lruvec(struct lruvec
bool proportional_reclaim;
struct blk_plug plug;
bool scan_adjusted;

+ if (lru_gen_enabled()) {
+ lru_gen_shrink_lruvec(lruvec, sc);
Expand All @@ -1229,7 +1229,7 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
get_scan_count(lruvec, sc, nr);

/* Record the original scan target for proportional adjustments later */
@@ -3642,6 +4412,9 @@ static void snapshot_refaults(struct mem
@@ -3652,6 +4422,9 @@ static void snapshot_refaults(struct mem
struct lruvec *target_lruvec;
unsigned long refaults;

Expand All @@ -1239,7 +1239,7 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
target_lruvec = mem_cgroup_lruvec(target_memcg, pgdat);
refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_ANON);
target_lruvec->refaults[0] = refaults;
@@ -4008,12 +4781,16 @@ unsigned long try_to_free_mem_cgroup_pag
@@ -4018,12 +4791,16 @@ unsigned long try_to_free_mem_cgroup_pag
}
#endif

Expand All @@ -1258,7 +1258,7 @@ Change-Id: Id47465f46f1f77f1e9f0be3972e380ddcfa37cc0
if (!can_age_anon_pages(pgdat, sc))
return;

@@ -4333,12 +5110,11 @@ restart:
@@ -4343,12 +5120,11 @@ restart:
sc.may_swap = !nr_boost_reclaim;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Change-Id: I4b9ca0fd20f566ce554e703f14cee3fe0048c2fd
/*
* The number of dirty pages determines if a node is marked
* reclaim_congested. kswapd will stall and start writing
@@ -3219,6 +3224,29 @@ static bool positive_ctrl_err(struct ctr
@@ -3231,6 +3236,29 @@ static bool positive_ctrl_err(struct ctr
* the aging
******************************************************************************/

Expand Down Expand Up @@ -290,7 +290,7 @@ Change-Id: I4b9ca0fd20f566ce554e703f14cee3fe0048c2fd
/* protect pages accessed multiple times through file descriptors */
static int folio_inc_gen(struct lruvec *lruvec, struct folio *folio, bool reclaiming)
{
@@ -3230,6 +3258,11 @@ static int folio_inc_gen(struct lruvec *
@@ -3242,6 +3270,11 @@ static int folio_inc_gen(struct lruvec *
VM_WARN_ON_ONCE_FOLIO(!(old_flags & LRU_GEN_MASK), folio);

do {
Expand All @@ -302,7 +302,7 @@ Change-Id: I4b9ca0fd20f566ce554e703f14cee3fe0048c2fd
new_gen = (old_gen + 1) % MAX_NR_GENS;

new_flags = old_flags & ~(LRU_GEN_MASK | LRU_REFS_MASK | LRU_REFS_FLAGS);
@@ -3244,6 +3277,43 @@ static int folio_inc_gen(struct lruvec *
@@ -3256,6 +3289,43 @@ static int folio_inc_gen(struct lruvec *
return new_gen;
}

Expand Down Expand Up @@ -346,7 +346,7 @@ Change-Id: I4b9ca0fd20f566ce554e703f14cee3fe0048c2fd
static void inc_min_seq(struct lruvec *lruvec, int type)
{
struct lru_gen_struct *lrugen = &lruvec->lrugen;
@@ -3443,6 +3513,114 @@ static void lru_gen_age_node(struct pgli
@@ -3455,6 +3525,114 @@ static void lru_gen_age_node(struct pgli
} while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)));
}

Expand Down Expand Up @@ -461,7 +461,7 @@ Change-Id: I4b9ca0fd20f566ce554e703f14cee3fe0048c2fd
/******************************************************************************
* the eviction
******************************************************************************/
@@ -3479,6 +3657,12 @@ static bool sort_folio(struct lruvec *lr
@@ -3491,6 +3669,12 @@ static bool sort_folio(struct lruvec *lr
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af

#include <asm/tlbflush.h>
#include <asm/div64.h>
@@ -3082,7 +3084,7 @@ static bool can_age_anon_pages(struct pg
@@ -3094,7 +3096,7 @@ static bool can_age_anon_pages(struct pg
for ((type) = 0; (type) < ANON_AND_FILE; (type)++) \
for ((zone) = 0; (zone) < MAX_NR_ZONES; (zone)++)

Expand All @@ -460,7 +460,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
{
struct pglist_data *pgdat = NODE_DATA(nid);

@@ -3128,6 +3130,371 @@ static bool __maybe_unused seq_is_valid(
@@ -3140,6 +3142,371 @@ static bool __maybe_unused seq_is_valid(
}

/******************************************************************************
Expand Down Expand Up @@ -832,7 +832,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
* refault feedback loop
******************************************************************************/

@@ -3277,6 +3644,118 @@ static int folio_inc_gen(struct lruvec *
@@ -3289,6 +3656,118 @@ static int folio_inc_gen(struct lruvec *
return new_gen;
}

Expand Down Expand Up @@ -951,7 +951,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
static unsigned long get_pte_pfn(pte_t pte, struct vm_area_struct *vma, unsigned long addr)
{
unsigned long pfn = pte_pfn(pte);
@@ -3295,8 +3774,28 @@ static unsigned long get_pte_pfn(pte_t p
@@ -3307,8 +3786,28 @@ static unsigned long get_pte_pfn(pte_t p
return pfn;
}

Expand Down Expand Up @@ -981,7 +981,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
{
struct folio *folio;

@@ -3311,9 +3810,375 @@ static struct folio *get_pfn_folio(unsig
@@ -3323,9 +3822,375 @@ static struct folio *get_pfn_folio(unsig
if (folio_memcg_rcu(folio) != memcg)
return NULL;

Expand Down Expand Up @@ -1357,7 +1357,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
static void inc_min_seq(struct lruvec *lruvec, int type)
{
struct lru_gen_struct *lrugen = &lruvec->lrugen;
@@ -3365,7 +4230,7 @@ next:
@@ -3377,7 +4242,7 @@ next:
return success;
}

Expand All @@ -1366,7 +1366,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
{
int prev, next;
int type, zone;
@@ -3375,9 +4240,6 @@ static void inc_max_seq(struct lruvec *l
@@ -3387,9 +4252,6 @@ static void inc_max_seq(struct lruvec *l

VM_WARN_ON_ONCE(!seq_is_valid(lruvec));

Expand All @@ -1376,7 +1376,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
for (type = ANON_AND_FILE - 1; type >= 0; type--) {
if (get_nr_gens(lruvec, type) != MAX_NR_GENS)
continue;
@@ -3415,10 +4277,74 @@ static void inc_max_seq(struct lruvec *l
@@ -3427,10 +4289,74 @@ static void inc_max_seq(struct lruvec *l

/* make sure preceding modifications appear */
smp_store_release(&lrugen->max_seq, lrugen->max_seq + 1);
Expand Down Expand Up @@ -1452,7 +1452,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
static bool should_run_aging(struct lruvec *lruvec, unsigned long max_seq, unsigned long *min_seq,
struct scan_control *sc, bool can_swap, unsigned long *nr_to_scan)
{
@@ -3494,7 +4420,7 @@ static void age_lruvec(struct lruvec *lr
@@ -3506,7 +4432,7 @@ static void age_lruvec(struct lruvec *lr

need_aging = should_run_aging(lruvec, max_seq, min_seq, sc, swappiness, &nr_to_scan);
if (need_aging)
Expand All @@ -1461,7 +1461,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
}

static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
@@ -3503,6 +4429,8 @@ static void lru_gen_age_node(struct pgli
@@ -3515,6 +4441,8 @@ static void lru_gen_age_node(struct pgli

VM_WARN_ON_ONCE(!current_is_kswapd());

Expand All @@ -1470,7 +1470,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
memcg = mem_cgroup_iter(NULL, NULL, NULL);
do {
struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat);
@@ -3511,11 +4439,16 @@ static void lru_gen_age_node(struct pgli
@@ -3523,11 +4451,16 @@ static void lru_gen_age_node(struct pgli

cond_resched();
} while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)));
Expand All @@ -1488,7 +1488,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
*/
void lru_gen_look_around(struct page_vma_mapped_walk *pvmw)
{
@@ -3524,6 +4457,8 @@ void lru_gen_look_around(struct page_vma
@@ -3536,6 +4469,8 @@ void lru_gen_look_around(struct page_vma
unsigned long start;
unsigned long end;
unsigned long addr;
Expand All @@ -1497,7 +1497,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)] = {};
struct folio *folio = pfn_folio(pvmw->pfn);
struct mem_cgroup *memcg = folio_memcg(folio);
@@ -3538,6 +4473,9 @@ void lru_gen_look_around(struct page_vma
@@ -3550,6 +4485,9 @@ void lru_gen_look_around(struct page_vma
if (spin_is_contended(pvmw->ptl))
return;

Expand All @@ -1507,7 +1507,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
start = max(pvmw->address & PMD_MASK, pvmw->vma->vm_start);
end = min(pvmw->address | ~PMD_MASK, pvmw->vma->vm_end - 1) + 1;

@@ -3567,13 +4505,15 @@ void lru_gen_look_around(struct page_vma
@@ -3579,13 +4517,15 @@ void lru_gen_look_around(struct page_vma
if (!pte_young(pte[i]))
continue;

Expand All @@ -1524,7 +1524,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
if (pte_dirty(pte[i]) && !folio_test_dirty(folio) &&
!(folio_test_anon(folio) && folio_test_swapbacked(folio) &&
!folio_test_swapcache(folio)))
@@ -3589,7 +4529,11 @@ void lru_gen_look_around(struct page_vma
@@ -3601,7 +4541,11 @@ void lru_gen_look_around(struct page_vma
arch_leave_lazy_mmu_mode();
rcu_read_unlock();

Expand All @@ -1537,7 +1537,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
for_each_set_bit(i, bitmap, MIN_LRU_BATCH) {
folio = pfn_folio(pte_pfn(pte[i]));
folio_activate(folio);
@@ -3601,8 +4545,10 @@ void lru_gen_look_around(struct page_vma
@@ -3613,8 +4557,10 @@ void lru_gen_look_around(struct page_vma
if (!mem_cgroup_trylock_pages(memcg))
return;

Expand All @@ -1550,7 +1550,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af

for_each_set_bit(i, bitmap, MIN_LRU_BATCH) {
folio = pfn_folio(pte_pfn(pte[i]));
@@ -3613,10 +4559,14 @@ void lru_gen_look_around(struct page_vma
@@ -3625,10 +4571,14 @@ void lru_gen_look_around(struct page_vma
if (old_gen < 0 || old_gen == new_gen)
continue;

Expand All @@ -1567,15 +1567,15 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af

mem_cgroup_unlock_pages();
}
@@ -3899,6 +4849,7 @@ static int evict_folios(struct lruvec *l
@@ -3911,6 +4861,7 @@ static int evict_folios(struct lruvec *l
struct folio *folio;
enum vm_event_item item;
struct reclaim_stat stat;
+ struct lru_gen_mm_walk *walk;
struct mem_cgroup *memcg = lruvec_memcg(lruvec);
struct pglist_data *pgdat = lruvec_pgdat(lruvec);

@@ -3935,6 +4886,10 @@ static int evict_folios(struct lruvec *l
@@ -3947,6 +4898,10 @@ static int evict_folios(struct lruvec *l

move_pages_to_lru(lruvec, &list);

Expand All @@ -1586,7 +1586,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
item = current_is_kswapd() ? PGSTEAL_KSWAPD : PGSTEAL_DIRECT;
if (!cgroup_reclaim(sc))
__count_vm_events(item, reclaimed);
@@ -3951,6 +4906,11 @@ static int evict_folios(struct lruvec *l
@@ -3963,6 +4918,11 @@ static int evict_folios(struct lruvec *l
return scanned;
}

Expand All @@ -1598,7 +1598,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
static unsigned long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc,
bool can_swap)
{
@@ -3976,7 +4936,8 @@ static unsigned long get_nr_to_scan(stru
@@ -3988,7 +4948,8 @@ static unsigned long get_nr_to_scan(stru
if (current_is_kswapd())
return 0;

Expand All @@ -1608,7 +1608,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
done:
return min_seq[!can_swap] + MIN_NR_GENS <= max_seq ? nr_to_scan : 0;
}
@@ -3990,6 +4951,8 @@ static void lru_gen_shrink_lruvec(struct
@@ -4002,6 +4963,8 @@ static void lru_gen_shrink_lruvec(struct

blk_start_plug(&plug);

Expand All @@ -1617,7 +1617,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
while (true) {
int delta;
int swappiness;
@@ -4017,6 +4980,8 @@ static void lru_gen_shrink_lruvec(struct
@@ -4029,6 +4992,8 @@ static void lru_gen_shrink_lruvec(struct
cond_resched();
}

Expand All @@ -1626,7 +1626,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
blk_finish_plug(&plug);
}

@@ -4033,15 +4998,21 @@ void lru_gen_init_lruvec(struct lruvec *
@@ -4045,15 +5010,21 @@ void lru_gen_init_lruvec(struct lruvec *

for_each_gen_type_zone(gen, type, zone)
INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]);
Expand All @@ -1648,7 +1648,7 @@ Change-Id: I1065451af34154306418510c19e03ea798dc13af
int nid;

for_each_node(nid) {
@@ -4049,6 +5020,11 @@ void lru_gen_exit_memcg(struct mem_cgrou
@@ -4061,6 +5032,11 @@ void lru_gen_exit_memcg(struct mem_cgrou

VM_WARN_ON_ONCE(memchr_inv(lruvec->lrugen.nr_pages, 0,
sizeof(lruvec->lrugen.nr_pages)));
Expand Down
Loading

0 comments on commit 944341a

Please sign in to comment.