reactos/ntoskrnl/include/internal
George Bișoc b22eefac88
[NTOS:PS] Process Quota Overhaul
-- Rewrite PspChargeProcessQuotaSpecifiedPool and PspReturnProcessQuotaSpecifiedPool private kernel routines, with the goal to implement the algorithms necessary to manage the fields of quota blocks (Usage, Return, Limit and Peak).
-- Invoke the Mm if quota limit raising or returning has to be done
-- When destroying a quota block, make sure that we're giving back all the rest of non-returned quotas to Memory Mm
-- Crash the system with QUOTA_UNDERFLOW if someone is returning way too much quota than it was previously charged
-- When a process exits, ensure that it doesn't hold up any charged quotas in QuotaUsage field of the process object, that way we're enforcing proper kernel consistency
-- Implement PsChargeSharedPoolQuota and PsChargeProcessPageFileQuota functions, used exclusively by the Object Manager. These routines are used to charge or return amount of quotas of a newly created object.
-- On PspInheritQuota, when assigning to process the default quota block if no parent process is given, we must increment the reference counts as we're using it
-- Handle the ProcessCount reference field, as it wasn't used
-- Annotate the functions with SAL
-- Document the code

=== REMARKS ===
Windows LogOn (Winlogon) is responsible for setting up a different quota block for all the processes within an interactive session, which is what we don't do. What we're currently doing instead is we're using the default block, PspDefaultQuotaBlock, for all the processes
across the system. The default block contains the default limits of -1 (which would imply no limits). By definition, the kernel won't ever return STATUS_QUOTA_EXCEEDED as we literally don't set up a definite limit for regular processes. This situation has to be tackled
in the future.

=== TODO FOR FUTURE ===
Most of the code in PspChargeProcessQuotaSpecifiedPool and PspReturnProcessQuotaSpecifiedPool private routines must be refactored in order to reduce the usage of the quota spin lock, possibly wrapping such code in a loop and whatnot.

CORE-17784
2022-01-11 10:11:09 +01:00
..
amd64 [NTOS:MM] MI_IS_*(): Improve documentation 2021-11-04 23:20:21 +03:00
arch
arm
i386 [NTOS:MM] MI_IS_*(): Improve documentation 2021-11-04 23:20:21 +03:00
cc.h [NTOS:CC] CcRosFlushVacb(): Fix Iosb annotation 2021-06-22 10:33:45 +02:00
cm.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
cm_x.h
dbgk.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
ex.h [NTOSKRNL] Implement InterlockedExchangeSizeT macro 2022-01-11 10:10:56 +01:00
fsrtl.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
hal.h [FSTUB] Fix bugs from 8d2fe54188 2020-12-07 19:50:51 +03:00
hdl.h
icif.h [NTOS:PS] Fix several issues within info classes in AMD64 build 2021-06-25 10:33:18 +02:00
inbv.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
io.h [NTOS:IO] Check RtlAnsiStringToUnicodeString return value when initializing ramdisk 2021-06-28 10:20:57 +02:00
io_i.h
io_x.h [NTOS:IO] Use a guarded region in IopQueueIrpToThread. 2021-11-20 14:58:51 -05:00
kd.h [NTOS:KD] Move some declarations where they belong 2020-11-16 08:55:03 +01:00
kd64.h [NTOS:KD][NTOS:KD64][NTOS:KDBG] Fix IRQL & spinlock use 2021-06-29 11:49:20 +02:00
ke.h [NTOS:KE] Unconditionally check IRQL when acquiring & releasing spinlock at DISPATCH_LEVEL 2021-06-29 11:49:20 +02:00
ke_x.h [NTOS:IO] Use a guarded region in IopQueueIrpToThread. 2021-11-20 14:58:51 -05:00
ldr.h
lpc.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
lpc_x.h
mm.h [NTOS:MM] Add the pool quota prototypes and some definitions 2022-01-11 10:11:08 +01:00
napi.h
ntoskrnl.h [NTOSKRNL] Move the ICIF related code and stuff into a separate header file 2021-05-02 20:49:06 +02:00
ob.h [NTOS:OB] Add a system process quota block macro 2022-01-11 10:11:09 +01:00
ob_x.h [NTOS:OB] Clarify and fix the usage of the Obp*DirectoryLock*() and ObpReleaseLookupContextObject() functions. 2021-09-25 00:47:43 +02:00
po.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
probe.h [NTOS:PS] Enable alignment probing for thread/process information classes 2021-06-06 17:14:22 +02:00
ps.h [NTOS:PS] Declare some prototypes and annotate the quota functions with SAL 2022-01-11 10:11:09 +01:00
ps_i.h [NTOS:PS] Support using QUOTA_LIMITS_EX in NtSetInformationProcess(ProcessQuotaLimits) 2021-07-15 19:33:45 +02:00
ps_x.h
rtl.h [NTOS:PS] On x64 don't fail in NtSetInformationProcess with ProcessUserModeIOPL information class, instead just don't do anything. 2020-09-20 23:08:17 +02:00
se.h [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
spinlock.h [NTOS:KE] Test spinlock ownership on both UP & MP build 2021-06-29 11:49:20 +02:00
tag.h [NTOS:PS] Process Quota Overhaul 2022-01-11 10:11:09 +01:00
test.h
vdm.h