cc58b11998
Instead of organizing page tables within slab blocks and allocating such blocks dynamically on demand, replace the page table allocator with a simple, static alternative. The new page table allocator is dimensioned at compile-time. When a PD runs out of page-tables, we simply flush its current mappings, and re-use the freed tables. The only exception is core/kernel that should not produce any page faults. Thereby it has to be ensured that core has enough page tables to populate it's virtual memory. A positive side-effect of this static approach is that the accounting of memory used for page-tables is now possible again. In the dynamic case there was no protocol existent that solved the problem of donating memory to core during a page fault. Fix #1588
35 lines
842 B
C++
35 lines
842 B
C++
/*
|
|
* \brief Static kernel configuration
|
|
* \author Martin Stein
|
|
* \date 2012-11-30
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2012-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _KERNEL__CONFIGURATION_H_
|
|
#define _KERNEL__CONFIGURATION_H_
|
|
|
|
namespace Kernel
|
|
{
|
|
enum {
|
|
DEFAULT_STACK_SIZE = 16 * 1024,
|
|
DEFAULT_TRANSLATION_TABLE_MAX = 128,
|
|
};
|
|
|
|
/* amount of priority bands amongst quota owners in CPU scheduling */
|
|
constexpr unsigned cpu_priorities = 4;
|
|
|
|
/* super period in CPU scheduling and the overall allocatable CPU time */
|
|
constexpr unsigned cpu_quota_ms = 1000;
|
|
|
|
/* time slice for the round-robin mode and the idle in CPU scheduling */
|
|
constexpr unsigned cpu_fill_ms = 10;
|
|
}
|
|
|
|
#endif /* _KERNEL__CONFIGURATION_H_ */
|