forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Some reorg and general cleanup - Improved config setup - My crude attempt at mimicking the HOS scheduler - Runs Super Mario Odyssey !! Co-authored-by: Uclydde <julianbraha@gmail.com>
- Loading branch information
1 parent
4754f8d
commit 0f64a39
Showing
24 changed files
with
768 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# CONFIG_TRANSPARENT_HUGEPAGE is not set | ||
CONFIG_HORIZON=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Copyright (C) 2022 | ||
* Kent Hall <kjh2166@columbia.edu> | ||
*/ | ||
|
||
#ifndef _LINUX_HORIZON_TYPES_H | ||
#define _LINUX_HORIZON_TYPES_H | ||
|
||
enum memory_attribute { | ||
HZN_MEMORY_ATTRIBUTE_LOCKED = (1 << 0), | ||
HZN_MEMORY_ATTRIBUTE_IPC_LOCKED = (1 << 1), | ||
HZN_MEMORY_ATTRIBUTE_DEVICE_SHARED = (1 << 2), | ||
HZN_MEMORY_ATTRIBUTE_UNCACHED = (1 << 3), | ||
}; | ||
|
||
enum memory_state { | ||
HZN_MEMORY_STATE_FREE = 0x00, | ||
HZN_MEMORY_STATE_IO = 0x01, | ||
HZN_MEMORY_STATE_STATIC = 0x02, | ||
HZN_MEMORY_STATE_CODE = 0x03, | ||
HZN_MEMORY_STATE_CODE_DATA = 0x04, | ||
HZN_MEMORY_STATE_NORMAL = 0x05, | ||
HZN_MEMORY_STATE_SHARED = 0x06, | ||
HZN_MEMORY_STATE_ALIAS = 0x07, | ||
HZN_MEMORY_STATE_ALIAS_CODE = 0x08, | ||
HZN_MEMORY_STATE_ALIAS_CODE_DATA = 0x09, | ||
HZN_MEMORY_STATE_IPC = 0x0A, | ||
HZN_MEMORY_STATE_STACK = 0x0B, | ||
HZN_MEMORY_STATE_THREAD_LOCAL = 0x0C, | ||
HZN_MEMORY_STATE_TRANSFERRED = 0x0D, | ||
HZN_MEMORY_STATE_SHARED_TRANSFERRED = 0x0E, | ||
HZN_MEMORY_STATE_SHARED_CODE = 0x0F, | ||
HZN_MEMORY_STATE_INACCESSIBLE = 0x10, | ||
HZN_MEMORY_STATE_NON_SECURE_IPC = 0x11, | ||
HZN_MEMORY_STATE_NON_DEVICE_IPC = 0x12, | ||
HZN_MEMORY_STATE_KERNEL = 0x13, | ||
HZN_MEMORY_STATE_GENERATED_CODE = 0x14, | ||
HZN_MEMORY_STATE_CODE_OUT = 0x15, | ||
}; | ||
|
||
enum memory_permission { | ||
HZN_MEMORY_PERMISSION_NONE = (0 << 0), | ||
HZN_MEMORY_PERMISSION_READ = (1 << 0), | ||
HZN_MEMORY_PERMISSION_WRITE = (1 << 1), | ||
HZN_MEMORY_PERMISSION_EXECUTE = (1 << 2), | ||
HZN_MEMORY_PERMISSION_READ_WRITE = HZN_MEMORY_PERMISSION_READ | HZN_MEMORY_PERMISSION_WRITE, | ||
HZN_MEMORY_PERMISSION_READ_EXECUTE = HZN_MEMORY_PERMISSION_READ | HZN_MEMORY_PERMISSION_EXECUTE, | ||
HZN_MEMORY_PERMISSION_DONT_CARE = (1 << 28), | ||
}; | ||
|
||
struct memory_info { | ||
u64 addr; | ||
u64 size; | ||
enum memory_state state; | ||
enum memory_attribute attr; | ||
enum memory_permission perm; | ||
u32 ipc_refcount; | ||
u32 device_refcount; | ||
u32 padding; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Copyright (C) 2022 | ||
* Kent Hall <kjh2166@columbia.edu> | ||
*/ | ||
|
||
#ifndef _LINUX_SCHED_HORIZON_H | ||
#define _LINUX_SCHED_HORIZON_H | ||
|
||
#include <linux/types.h> | ||
|
||
#define HZN_LOWEST_THREAD_PRIORITY 63 | ||
#define HZN_HIGHEST_THREAD_PRIORITY 0 | ||
|
||
enum hzn_yield_type { | ||
HZN_YIELD_TYPE_WITHOUT_CORE_MIGRATION = -2, | ||
HZN_YIELD_TYPE_WITH_CORE_MIGRATION = -1, | ||
HZN_YIELD_TYPE_TO_ANY_THREAD = 0, | ||
|
||
HZN_YIELD_NONE = 1, | ||
}; | ||
|
||
struct task_struct; | ||
|
||
extern int get_hzn_priority(struct task_struct *p); | ||
|
||
extern bool set_hzn_priority(struct task_struct *p, int priority); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.