Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepin: KABI: KABI reservation for mm structures #560

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/linux/mempolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ struct mempolicy {
nodemask_t cpuset_mems_allowed; /* relative to these nodes */
nodemask_t user_nodemask; /* nodemask passed by user */
} w;
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
};

/*
Expand Down
4 changes: 4 additions & 0 deletions include/linux/mempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <linux/wait.h>
#include <linux/compiler.h>
#include <linux/deepin_kabi.h>

struct kmem_cache;

Expand All @@ -23,6 +24,9 @@ typedef struct mempool_s {
mempool_alloc_t *alloc;
mempool_free_t *free;
wait_queue_head_t wait;
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
} mempool_t;

static inline bool mempool_initialized(mempool_t *pool)
Expand Down
9 changes: 9 additions & 0 deletions include/linux/memremap.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ struct vmem_altmap {
unsigned long free;
unsigned long align;
unsigned long alloc;
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
};

/*
Expand Down Expand Up @@ -99,6 +101,8 @@ struct dev_pagemap_ops {
*/
int (*memory_failure)(struct dev_pagemap *pgmap, unsigned long pfn,
unsigned long nr_pages, int mf_flags);
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
};

#define PGMAP_ALTMAP_VALID (1 << 0)
Expand Down Expand Up @@ -133,6 +137,11 @@ struct dev_pagemap {
const struct dev_pagemap_ops *ops;
void *owner;
int nr_range;
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
DEEPIN_KABI_RESERVE(5)
union {
struct range range;
DECLARE_FLEX_ARRAY(struct range, ranges);
Expand Down
7 changes: 7 additions & 0 deletions include/linux/mm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include <asm/mmu.h>

#include <linux/deepin_kabi.h>

#ifndef AT_VECTOR_SIZE_ARCH
#define AT_VECTOR_SIZE_ARCH 0
#endif
Expand Down Expand Up @@ -1232,6 +1234,11 @@ enum vm_fault_reason {
struct vm_special_mapping {
const char *name; /* The name, e.g. "[vdso]". */

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
DEEPIN_KABI_RESERVE(5)
/*
* If .fault is not provided, this points to a
* NULL-terminated array of pages that back the special mapping.
Expand Down
4 changes: 4 additions & 0 deletions include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,10 @@ struct lruvec {
#ifdef CONFIG_MEMCG
struct pglist_data *pgdat;
#endif
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
};

/* Isolate unmapped pages */
Expand Down
4 changes: 4 additions & 0 deletions include/linux/pagemap.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/bitops.h>
#include <linux/hardirq.h> /* for in_interrupt() */
#include <linux/hugetlb_inline.h>
#include <linux/deepin_kabi.h>

struct folio_batch;

Expand Down Expand Up @@ -1277,6 +1278,9 @@ struct readahead_control {
struct file *file;
struct address_space *mapping;
struct file_ra_state *ra;
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
/* private: use the readahead_* accessors instead */
pgoff_t _index;
unsigned int _nr_pages;
Expand Down
7 changes: 7 additions & 0 deletions include/linux/shrinker.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <linux/atomic.h>
#include <linux/types.h>
#include <linux/deepin_kabi.h>

/*
* This struct is used to pass information from page reclaim to the shrinkers.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

Expand Down Expand Up @@ -34,6 +35,9 @@ struct shrink_control {

/* current memcg being shrunk (for memcg aware shrinkers) */
struct mem_cgroup *memcg;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
};

#define SHRINK_STOP (~0UL)
Expand Down Expand Up @@ -83,6 +87,9 @@ struct shrinker {
#endif
/* objs pending delete, per node */
atomic_long_t *nr_deferred;

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
};
#define DEFAULT_SEEKS 2 /* A good number if you don't know better. */

Expand Down
Loading