All Questions
Tagged with kernel virtual-memory
55 questions
0
votes
0
answers
46
views
How does paging start in a kernel?
If an allocator requires paging to have been set up already, that means that paging must be setup without an allocator, no? So where is the page table put?
0
votes
1
answer
44
views
When memory is allocated using kmalloc, is a virtual memory address with an already established PTE (Page Table Entry) returned?
When memory is allocated via kmalloc (i.e., slab cache allocation like slab_alloc_node), it returns a virtual memory address. Presumably, when accessing this virtual address, the corresponding PTE (...
0
votes
2
answers
100
views
What happens if the kernel uses more than 1gb?
I am learning about operating systems and there are two things I would like to know.
Assuming that the address space division is 1/3 gb (1gb for the kernel and 3gb for the process).
What happens if ...
0
votes
1
answer
89
views
since page table is needed to translate virtual address, how could linux kernel access and manipulate page table itself with virtual address?
According to my current understanding:
there's kernel code that access or manipulate page table
In kernel code, it's also virtual address used to access any struct or object, including page table
...
4
votes
1
answer
481
views
Why does my system heavily use swap when there are 86 GB of RAM still usable?
This is not so much a performance problem as it is a desire to understand what is happening and how it works. I have a system with lots of resources, including 128 GB of RAM. What I have discovered (...
9
votes
1
answer
2k
views
Does linux kernel use virtual memory (for its data)?
Does linux kernel make use of virtual memory for its data structures (page tables, descriptors, etc.)? More specifically:
Are kernel space addresses translated in the MMU (pagetable walking)?
Could ...
0
votes
1
answer
784
views
Why can't user process READ memory in kernel address space?
It seems fairly obvious why user processes can't write or modify data on kernel address space. But I can't get my head around why they can't even read the data.
I know that a segmentation trap would ...
0
votes
1
answer
1k
views
Do CPUs that support 5-Level Papging implement a 57-bit long address bus? [closed]
Despite having a data bus size of 64 bit, the address bus size of modern AMD64-compatible CPUs is/was 48 bit for some time which allows using 48-bit long virtual memory addresses with a maximum of ...
2
votes
0
answers
294
views
/sys/kernel/slab/ contents :at-0000016 :t-0000040 :dt-0001024 etc. meaning
While examining some memory leak I found a strange for me contents of /sys/kernel/slab/ directory. It contains a list of directories:
:at-0000016 :t-0000040 :t-0000832
:at-0000032 :t-0000048 :t-...
2
votes
0
answers
132
views
Kernel refusing to free up disk cache
I have ~20GB of RAM and ~4GB of swap on my machine. Around 8GB of memory is used by applications, the rest is used for disk space by the kernel. Over time, the swap fills up completely and then ...
3
votes
3
answers
659
views
Does page swapping happen when the main memory is still available?
I just stumbled upon a random question that goes like, does the Linux kernel swap out any memory pages even when there are still some available memory spaces? I thought it does not in principle, but ...
4
votes
1
answer
1k
views
How are the kernel page tables shared among all processes?
I’m trying to better understand on, say, x86, how the kernel is mapped into every process address space such that changing what a kernel address maps to is able to change in all processes and all ...
3
votes
0
answers
364
views
Linux kernel is somehow failing to create addresses for prefetchable pcie devices behind a pcie bridge [closed]
My problem is:
I’m unable to get BAR addresing from prefetchable end-point devices behind a pcie bridge with two different linux devices. They both run kernel version 4.9.x. Can anyone help me with ...
2
votes
1
answer
540
views
Print the system memory structure
My system hosts 8 GB of RAM and 2 GB of VRAM. It runs Ubuntu 18.04 with kernel 4.15.0-74-generic x86_64.
IIUC, these two types of memory, in addition to the BIOS read-only memory, are mapped into ...
0
votes
1
answer
66
views
Would an asynchronous interrupt context write to the page table in the Linux kernel?
Specifically, in the Linux kernel, is it possible that the page table (level3_kernel_pgt) can be overwritten when an asynchronous interrupt context happens (Local timer interrupts).
I've been seeing ...