Merge d133023c9a ("ocfs2: stop quota recovery before disabling quotas") into android16-6.12-lts
Steps on the way to 6.12.29 Change-Id: I52c3962ac2f0f7a3de8001ebcc8e66628283d9fb Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -90,6 +90,8 @@ int check_compaction(unsigned long mem_free, unsigned long hugepage_size,
|
||||
int compaction_index = 0;
|
||||
char nr_hugepages[20] = {0};
|
||||
char init_nr_hugepages[24] = {0};
|
||||
char target_nr_hugepages[24] = {0};
|
||||
int slen;
|
||||
|
||||
snprintf(init_nr_hugepages, sizeof(init_nr_hugepages),
|
||||
"%lu", initial_nr_hugepages);
|
||||
@@ -106,11 +108,18 @@ int check_compaction(unsigned long mem_free, unsigned long hugepage_size,
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Request a large number of huge pages. The Kernel will allocate
|
||||
as much as it can */
|
||||
if (write(fd, "100000", (6*sizeof(char))) != (6*sizeof(char))) {
|
||||
ksft_print_msg("Failed to write 100000 to /proc/sys/vm/nr_hugepages: %s\n",
|
||||
strerror(errno));
|
||||
/*
|
||||
* Request huge pages for about half of the free memory. The Kernel
|
||||
* will allocate as much as it can, and we expect it will get at least 1/3
|
||||
*/
|
||||
nr_hugepages_ul = mem_free / hugepage_size / 2;
|
||||
snprintf(target_nr_hugepages, sizeof(target_nr_hugepages),
|
||||
"%lu", nr_hugepages_ul);
|
||||
|
||||
slen = strlen(target_nr_hugepages);
|
||||
if (write(fd, target_nr_hugepages, slen) != slen) {
|
||||
ksft_print_msg("Failed to write %lu to /proc/sys/vm/nr_hugepages: %s\n",
|
||||
nr_hugepages_ul, strerror(errno));
|
||||
goto close_fd;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,8 +102,18 @@ void expect_fault_on_read_execonly_key(void *p1, int pkey)
|
||||
return;
|
||||
}
|
||||
|
||||
#define REPEAT_8(s) s s s s s s s s
|
||||
#define REPEAT_64(s) REPEAT_8(s) REPEAT_8(s) REPEAT_8(s) REPEAT_8(s) \
|
||||
REPEAT_8(s) REPEAT_8(s) REPEAT_8(s) REPEAT_8(s)
|
||||
#define REPEAT_512(s) REPEAT_64(s) REPEAT_64(s) REPEAT_64(s) REPEAT_64(s) \
|
||||
REPEAT_64(s) REPEAT_64(s) REPEAT_64(s) REPEAT_64(s)
|
||||
#define REPEAT_4096(s) REPEAT_512(s) REPEAT_512(s) REPEAT_512(s) REPEAT_512(s) \
|
||||
REPEAT_512(s) REPEAT_512(s) REPEAT_512(s) REPEAT_512(s)
|
||||
#define REPEAT_16384(s) REPEAT_4096(s) REPEAT_4096(s) \
|
||||
REPEAT_4096(s) REPEAT_4096(s)
|
||||
|
||||
/* 4-byte instructions * 16384 = 64K page */
|
||||
#define __page_o_noops() asm(".rept 16384 ; nop; .endr")
|
||||
#define __page_o_noops() asm(REPEAT_16384("nop\n"))
|
||||
|
||||
void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 pkey)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user