Are Linux kernel modules a sort of Linux system paged pool?Disadvantages of linux kernel module?Disadvantages of linux kernel module?How to list all loadable kernel modules?Kernel modules for compiled kernelRecompile kernel without modules that are not currently in useHow connected are kernel modules to kernel version?Are kernel modules specific for linux or a general mechanism?Suppressing auto loading of Linux kernel modulesCompiling Loadable Kernel Modules in LinuxLinux Kernel memory management quoteHow are Linux kernel modules installed into the Android system.img
MITM on HTTPS traffic in Kazakhstan 2019
Can "Taking algebraic closure" be made into a functor?
Acoustic guitar chords' positions vs those of a Bass guitar
Count the identical pairs in two lists
Impact of throwing away fruit waste on a peak > 3200 m above a glacier
My guitar strings go loose when I tighten them?
What is the metal bit in the front of this propeller spinner?
How to deal with making design decisions
How should I handle a question regarding my regrets during an interview?
My current job follows "worst practices". How can I talk about my experience in an interview without giving off red flags?
How often should alkaline batteries be checked when they are in a device?
Cargo capacity of a kayak
Is there any direct train from LHR Airport to Newcastle Gateshead?
What kind of curve (or model) should I fit to my percentage data?
What would be the effects of (relatively) widespread precognition on the stock market?
What are "the high ends of castles" called?
Strange LED behavior
As a DM of a 4-player group, would it be appropriate for me to run a private 1-on-1 session so that one PC can act secretly?
Can a warlock shoot multiple beams from the Eldritch Blast cantrip with only a single free hand?
Why is there an extra "t" in Lemmatization?
Found old paper shares of Motorola Inc that has since been broken up
I have a domain, static IP and many devices I'd like to access outside my house. How to route them?
Reissue US, UK, Canada visas in stolen passports
What does a Nintendo Game Boy do when turned on without a game cartridge inserted?
Are Linux kernel modules a sort of Linux system paged pool?
Disadvantages of linux kernel module?Disadvantages of linux kernel module?How to list all loadable kernel modules?Kernel modules for compiled kernelRecompile kernel without modules that are not currently in useHow connected are kernel modules to kernel version?Are kernel modules specific for linux or a general mechanism?Suppressing auto loading of Linux kernel modulesCompiling Loadable Kernel Modules in LinuxLinux Kernel memory management quoteHow are Linux kernel modules installed into the Android system.img
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I always read that Linux kernel isn't pageable.
If I'm not mistaken Windows, instead, divedes system virtual memory in
a paged part (paged pool) and non-paged part (non-paged pool).
The non-paged part is mapped directly to physical memory and stay there all the time because takes care of the most important tasks kernel must accomplish, while less important portions may be not.
Linux kernel,instead, is divided into laodable modules, but no information I managed to gather on how these modules are implemented.
I don't understand if they're paged and thus you can temporarily transfer them to the disk. What I usually read is that we can "free" memory by unloading them, what is meant with this is still obscure to me.
When I writed "paged" or "pageable" along this post, I implicitly meant that you can swap out on disk these pages. I addressed this because usually Linux kernel is considered paged but it can't be swapped out
linux-kernel kernel-modules swap virtual-memory
migrated from cs.stackexchange.com 11 hours ago
This question came from our site for students, researchers and practitioners of computer science.
add a comment |
I always read that Linux kernel isn't pageable.
If I'm not mistaken Windows, instead, divedes system virtual memory in
a paged part (paged pool) and non-paged part (non-paged pool).
The non-paged part is mapped directly to physical memory and stay there all the time because takes care of the most important tasks kernel must accomplish, while less important portions may be not.
Linux kernel,instead, is divided into laodable modules, but no information I managed to gather on how these modules are implemented.
I don't understand if they're paged and thus you can temporarily transfer them to the disk. What I usually read is that we can "free" memory by unloading them, what is meant with this is still obscure to me.
When I writed "paged" or "pageable" along this post, I implicitly meant that you can swap out on disk these pages. I addressed this because usually Linux kernel is considered paged but it can't be swapped out
linux-kernel kernel-modules swap virtual-memory
migrated from cs.stackexchange.com 11 hours ago
This question came from our site for students, researchers and practitioners of computer science.
add a comment |
I always read that Linux kernel isn't pageable.
If I'm not mistaken Windows, instead, divedes system virtual memory in
a paged part (paged pool) and non-paged part (non-paged pool).
The non-paged part is mapped directly to physical memory and stay there all the time because takes care of the most important tasks kernel must accomplish, while less important portions may be not.
Linux kernel,instead, is divided into laodable modules, but no information I managed to gather on how these modules are implemented.
I don't understand if they're paged and thus you can temporarily transfer them to the disk. What I usually read is that we can "free" memory by unloading them, what is meant with this is still obscure to me.
When I writed "paged" or "pageable" along this post, I implicitly meant that you can swap out on disk these pages. I addressed this because usually Linux kernel is considered paged but it can't be swapped out
linux-kernel kernel-modules swap virtual-memory
I always read that Linux kernel isn't pageable.
If I'm not mistaken Windows, instead, divedes system virtual memory in
a paged part (paged pool) and non-paged part (non-paged pool).
The non-paged part is mapped directly to physical memory and stay there all the time because takes care of the most important tasks kernel must accomplish, while less important portions may be not.
Linux kernel,instead, is divided into laodable modules, but no information I managed to gather on how these modules are implemented.
I don't understand if they're paged and thus you can temporarily transfer them to the disk. What I usually read is that we can "free" memory by unloading them, what is meant with this is still obscure to me.
When I writed "paged" or "pageable" along this post, I implicitly meant that you can swap out on disk these pages. I addressed this because usually Linux kernel is considered paged but it can't be swapped out
linux-kernel kernel-modules swap virtual-memory
linux-kernel kernel-modules swap virtual-memory
edited 11 hours ago
Gilles
565k134 gold badges1162 silver badges1670 bronze badges
565k134 gold badges1162 silver badges1670 bronze badges
asked 12 hours ago
Gabriele ScarlattiGabriele Scarlatti
1343 bronze badges
1343 bronze badges
migrated from cs.stackexchange.com 11 hours ago
This question came from our site for students, researchers and practitioners of computer science.
migrated from cs.stackexchange.com 11 hours ago
This question came from our site for students, researchers and practitioners of computer science.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
No part of the Linux kernel can be paged out, even parts that come from modules.
A kernel module can be loaded and (if the module supports it) can be unloaded. This always happens from an explicit request from a userland process with the init_module
and delete_module
system calls (normally, via the insmod
or modprobe
utilities for loading, and via rmmod
for unloading).
Once a module is loaded, it's part of the kernel, like any other part of the kernel. In particular, there's no way to isolate the memory used by a specific module. The kernel keeps tracks of which part of the memory contains a specific module's code, but not where a module may have stored data. A module can modify any of the kernel's data structures, after all.
A module can potentially add some code to any kernel subsystem. Most modules are hardware drivers, but some aren't (e.g. they can provide security functionality, filesystems, networking functionality, etc.). If data or code used by a module could be swapped out, then the rest of the kernel would have to load it when required, which would complicate the design of the system a lot. The kernel would also need to ensure that no part of the memory that's swapped out is ever necessary to swap it back in, which is difficult. What if the swap is in a swap file on a network filesystem, and the module provides firewall functionality that is involved in communicating with the server that stores the file?
It's possible to completely unload a module because it's the module's job to provide code that ensures that the module is not needed for anything. The kernel runs the module's exit function, and only unloads the module if that function reports that the module can be safely unloaded. The exit function must free any remaining data memory that is “owned” by the module (i.e. data that the module needs, but no other part of the kernel needs), and must verify that no code in the module is registered to be called when something happens. There's no way to save a module's data to swap: a module can only be removed from RAM if it has no data left.
So essentially process segments can be swapped in and out, while kernel modules can be only loaded and unloaded. The difference seems to be only that when we swap out pages we save what has changed, while a kernel module is just freed when it's sure to be not used again and so no saving is done. Is it that?
– Gabriele Scarlatti
10 hours ago
1
@Gabriele unloading a module releases its memory in the same way that exiting a process does: the memory is no longer needed. Swapping is used with memory pages which are still needed, don’t have their own backing store, and which the kernel decides are better off stored outside of physical memory.
– Stephen Kitt
10 hours ago
@StephenKitt But can kernel module be unloaded during a process execution? or only when the process that uses the module terminate?
– Gabriele Scarlatti
10 hours ago
@Gabriele I was only comparing the two, not implying that unloading a kernel module was tied to process execution. When a process exits, its memory is no longer needed and is freed. When a kernel module is unloaded, its memory is no longer needed and is freed.
– Stephen Kitt
10 hours ago
yes I know, I just needed to see it stated :) Thanks
– Gabriele Scarlatti
10 hours ago
add a comment |
Memory pages swapping (you call it "paging") and Linux kernel modules loading/unloading are two completely different functionalities.
A Linux kernel module can be loaded into the kernel - after that it becomes a part of the kernel. The goal here is to adjust the kernel to a given hardware. For example, there are hundreds of types of network cards, and there are many kernel modules, which support these cards - but on any particular machine at any given moment you'll have only one type of network card. The Linux chooses the right kernel module for this card and loads it, leaving all the other modules in the external memory.
For more information about kernel modules please read here.
So kernel modules aren't swapped in and out? Altough Iit seemed to me that it happens in windows, are they different (windows and linux) on that?
– Gabriele Scarlatti
11 hours ago
Moreover the second answer to this post unix.stackexchange.com/questions/65481/… seems to imply that Linux kernel modules can be loaded and unloaded on demand, isn't this a form page swap?
– Gabriele Scarlatti
11 hours ago
After the kernel module is loaded it becomes a part of the kernel, so it can't be swapped out. I have no idea about Windows internals
– HEKTO
10 hours ago
Modules are typically loaded during the system boot, but there are no such restriction. No, it's not a form of swapping - the system swaps memory page by page, not module by module
– HEKTO
10 hours ago
So, why is "paging" wrong? At least by some sources, "swapping" refers to swapping out whole programs at a time, while "paging" refers to doing essentially the same but a page at a time.
– ilkkachu
10 hours ago
|
show 1 more comment
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f531554%2fare-linux-kernel-modules-a-sort-of-linux-system-paged-pool%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
No part of the Linux kernel can be paged out, even parts that come from modules.
A kernel module can be loaded and (if the module supports it) can be unloaded. This always happens from an explicit request from a userland process with the init_module
and delete_module
system calls (normally, via the insmod
or modprobe
utilities for loading, and via rmmod
for unloading).
Once a module is loaded, it's part of the kernel, like any other part of the kernel. In particular, there's no way to isolate the memory used by a specific module. The kernel keeps tracks of which part of the memory contains a specific module's code, but not where a module may have stored data. A module can modify any of the kernel's data structures, after all.
A module can potentially add some code to any kernel subsystem. Most modules are hardware drivers, but some aren't (e.g. they can provide security functionality, filesystems, networking functionality, etc.). If data or code used by a module could be swapped out, then the rest of the kernel would have to load it when required, which would complicate the design of the system a lot. The kernel would also need to ensure that no part of the memory that's swapped out is ever necessary to swap it back in, which is difficult. What if the swap is in a swap file on a network filesystem, and the module provides firewall functionality that is involved in communicating with the server that stores the file?
It's possible to completely unload a module because it's the module's job to provide code that ensures that the module is not needed for anything. The kernel runs the module's exit function, and only unloads the module if that function reports that the module can be safely unloaded. The exit function must free any remaining data memory that is “owned” by the module (i.e. data that the module needs, but no other part of the kernel needs), and must verify that no code in the module is registered to be called when something happens. There's no way to save a module's data to swap: a module can only be removed from RAM if it has no data left.
So essentially process segments can be swapped in and out, while kernel modules can be only loaded and unloaded. The difference seems to be only that when we swap out pages we save what has changed, while a kernel module is just freed when it's sure to be not used again and so no saving is done. Is it that?
– Gabriele Scarlatti
10 hours ago
1
@Gabriele unloading a module releases its memory in the same way that exiting a process does: the memory is no longer needed. Swapping is used with memory pages which are still needed, don’t have their own backing store, and which the kernel decides are better off stored outside of physical memory.
– Stephen Kitt
10 hours ago
@StephenKitt But can kernel module be unloaded during a process execution? or only when the process that uses the module terminate?
– Gabriele Scarlatti
10 hours ago
@Gabriele I was only comparing the two, not implying that unloading a kernel module was tied to process execution. When a process exits, its memory is no longer needed and is freed. When a kernel module is unloaded, its memory is no longer needed and is freed.
– Stephen Kitt
10 hours ago
yes I know, I just needed to see it stated :) Thanks
– Gabriele Scarlatti
10 hours ago
add a comment |
No part of the Linux kernel can be paged out, even parts that come from modules.
A kernel module can be loaded and (if the module supports it) can be unloaded. This always happens from an explicit request from a userland process with the init_module
and delete_module
system calls (normally, via the insmod
or modprobe
utilities for loading, and via rmmod
for unloading).
Once a module is loaded, it's part of the kernel, like any other part of the kernel. In particular, there's no way to isolate the memory used by a specific module. The kernel keeps tracks of which part of the memory contains a specific module's code, but not where a module may have stored data. A module can modify any of the kernel's data structures, after all.
A module can potentially add some code to any kernel subsystem. Most modules are hardware drivers, but some aren't (e.g. they can provide security functionality, filesystems, networking functionality, etc.). If data or code used by a module could be swapped out, then the rest of the kernel would have to load it when required, which would complicate the design of the system a lot. The kernel would also need to ensure that no part of the memory that's swapped out is ever necessary to swap it back in, which is difficult. What if the swap is in a swap file on a network filesystem, and the module provides firewall functionality that is involved in communicating with the server that stores the file?
It's possible to completely unload a module because it's the module's job to provide code that ensures that the module is not needed for anything. The kernel runs the module's exit function, and only unloads the module if that function reports that the module can be safely unloaded. The exit function must free any remaining data memory that is “owned” by the module (i.e. data that the module needs, but no other part of the kernel needs), and must verify that no code in the module is registered to be called when something happens. There's no way to save a module's data to swap: a module can only be removed from RAM if it has no data left.
So essentially process segments can be swapped in and out, while kernel modules can be only loaded and unloaded. The difference seems to be only that when we swap out pages we save what has changed, while a kernel module is just freed when it's sure to be not used again and so no saving is done. Is it that?
– Gabriele Scarlatti
10 hours ago
1
@Gabriele unloading a module releases its memory in the same way that exiting a process does: the memory is no longer needed. Swapping is used with memory pages which are still needed, don’t have their own backing store, and which the kernel decides are better off stored outside of physical memory.
– Stephen Kitt
10 hours ago
@StephenKitt But can kernel module be unloaded during a process execution? or only when the process that uses the module terminate?
– Gabriele Scarlatti
10 hours ago
@Gabriele I was only comparing the two, not implying that unloading a kernel module was tied to process execution. When a process exits, its memory is no longer needed and is freed. When a kernel module is unloaded, its memory is no longer needed and is freed.
– Stephen Kitt
10 hours ago
yes I know, I just needed to see it stated :) Thanks
– Gabriele Scarlatti
10 hours ago
add a comment |
No part of the Linux kernel can be paged out, even parts that come from modules.
A kernel module can be loaded and (if the module supports it) can be unloaded. This always happens from an explicit request from a userland process with the init_module
and delete_module
system calls (normally, via the insmod
or modprobe
utilities for loading, and via rmmod
for unloading).
Once a module is loaded, it's part of the kernel, like any other part of the kernel. In particular, there's no way to isolate the memory used by a specific module. The kernel keeps tracks of which part of the memory contains a specific module's code, but not where a module may have stored data. A module can modify any of the kernel's data structures, after all.
A module can potentially add some code to any kernel subsystem. Most modules are hardware drivers, but some aren't (e.g. they can provide security functionality, filesystems, networking functionality, etc.). If data or code used by a module could be swapped out, then the rest of the kernel would have to load it when required, which would complicate the design of the system a lot. The kernel would also need to ensure that no part of the memory that's swapped out is ever necessary to swap it back in, which is difficult. What if the swap is in a swap file on a network filesystem, and the module provides firewall functionality that is involved in communicating with the server that stores the file?
It's possible to completely unload a module because it's the module's job to provide code that ensures that the module is not needed for anything. The kernel runs the module's exit function, and only unloads the module if that function reports that the module can be safely unloaded. The exit function must free any remaining data memory that is “owned” by the module (i.e. data that the module needs, but no other part of the kernel needs), and must verify that no code in the module is registered to be called when something happens. There's no way to save a module's data to swap: a module can only be removed from RAM if it has no data left.
No part of the Linux kernel can be paged out, even parts that come from modules.
A kernel module can be loaded and (if the module supports it) can be unloaded. This always happens from an explicit request from a userland process with the init_module
and delete_module
system calls (normally, via the insmod
or modprobe
utilities for loading, and via rmmod
for unloading).
Once a module is loaded, it's part of the kernel, like any other part of the kernel. In particular, there's no way to isolate the memory used by a specific module. The kernel keeps tracks of which part of the memory contains a specific module's code, but not where a module may have stored data. A module can modify any of the kernel's data structures, after all.
A module can potentially add some code to any kernel subsystem. Most modules are hardware drivers, but some aren't (e.g. they can provide security functionality, filesystems, networking functionality, etc.). If data or code used by a module could be swapped out, then the rest of the kernel would have to load it when required, which would complicate the design of the system a lot. The kernel would also need to ensure that no part of the memory that's swapped out is ever necessary to swap it back in, which is difficult. What if the swap is in a swap file on a network filesystem, and the module provides firewall functionality that is involved in communicating with the server that stores the file?
It's possible to completely unload a module because it's the module's job to provide code that ensures that the module is not needed for anything. The kernel runs the module's exit function, and only unloads the module if that function reports that the module can be safely unloaded. The exit function must free any remaining data memory that is “owned” by the module (i.e. data that the module needs, but no other part of the kernel needs), and must verify that no code in the module is registered to be called when something happens. There's no way to save a module's data to swap: a module can only be removed from RAM if it has no data left.
answered 10 hours ago
GillesGilles
565k134 gold badges1162 silver badges1670 bronze badges
565k134 gold badges1162 silver badges1670 bronze badges
So essentially process segments can be swapped in and out, while kernel modules can be only loaded and unloaded. The difference seems to be only that when we swap out pages we save what has changed, while a kernel module is just freed when it's sure to be not used again and so no saving is done. Is it that?
– Gabriele Scarlatti
10 hours ago
1
@Gabriele unloading a module releases its memory in the same way that exiting a process does: the memory is no longer needed. Swapping is used with memory pages which are still needed, don’t have their own backing store, and which the kernel decides are better off stored outside of physical memory.
– Stephen Kitt
10 hours ago
@StephenKitt But can kernel module be unloaded during a process execution? or only when the process that uses the module terminate?
– Gabriele Scarlatti
10 hours ago
@Gabriele I was only comparing the two, not implying that unloading a kernel module was tied to process execution. When a process exits, its memory is no longer needed and is freed. When a kernel module is unloaded, its memory is no longer needed and is freed.
– Stephen Kitt
10 hours ago
yes I know, I just needed to see it stated :) Thanks
– Gabriele Scarlatti
10 hours ago
add a comment |
So essentially process segments can be swapped in and out, while kernel modules can be only loaded and unloaded. The difference seems to be only that when we swap out pages we save what has changed, while a kernel module is just freed when it's sure to be not used again and so no saving is done. Is it that?
– Gabriele Scarlatti
10 hours ago
1
@Gabriele unloading a module releases its memory in the same way that exiting a process does: the memory is no longer needed. Swapping is used with memory pages which are still needed, don’t have their own backing store, and which the kernel decides are better off stored outside of physical memory.
– Stephen Kitt
10 hours ago
@StephenKitt But can kernel module be unloaded during a process execution? or only when the process that uses the module terminate?
– Gabriele Scarlatti
10 hours ago
@Gabriele I was only comparing the two, not implying that unloading a kernel module was tied to process execution. When a process exits, its memory is no longer needed and is freed. When a kernel module is unloaded, its memory is no longer needed and is freed.
– Stephen Kitt
10 hours ago
yes I know, I just needed to see it stated :) Thanks
– Gabriele Scarlatti
10 hours ago
So essentially process segments can be swapped in and out, while kernel modules can be only loaded and unloaded. The difference seems to be only that when we swap out pages we save what has changed, while a kernel module is just freed when it's sure to be not used again and so no saving is done. Is it that?
– Gabriele Scarlatti
10 hours ago
So essentially process segments can be swapped in and out, while kernel modules can be only loaded and unloaded. The difference seems to be only that when we swap out pages we save what has changed, while a kernel module is just freed when it's sure to be not used again and so no saving is done. Is it that?
– Gabriele Scarlatti
10 hours ago
1
1
@Gabriele unloading a module releases its memory in the same way that exiting a process does: the memory is no longer needed. Swapping is used with memory pages which are still needed, don’t have their own backing store, and which the kernel decides are better off stored outside of physical memory.
– Stephen Kitt
10 hours ago
@Gabriele unloading a module releases its memory in the same way that exiting a process does: the memory is no longer needed. Swapping is used with memory pages which are still needed, don’t have their own backing store, and which the kernel decides are better off stored outside of physical memory.
– Stephen Kitt
10 hours ago
@StephenKitt But can kernel module be unloaded during a process execution? or only when the process that uses the module terminate?
– Gabriele Scarlatti
10 hours ago
@StephenKitt But can kernel module be unloaded during a process execution? or only when the process that uses the module terminate?
– Gabriele Scarlatti
10 hours ago
@Gabriele I was only comparing the two, not implying that unloading a kernel module was tied to process execution. When a process exits, its memory is no longer needed and is freed. When a kernel module is unloaded, its memory is no longer needed and is freed.
– Stephen Kitt
10 hours ago
@Gabriele I was only comparing the two, not implying that unloading a kernel module was tied to process execution. When a process exits, its memory is no longer needed and is freed. When a kernel module is unloaded, its memory is no longer needed and is freed.
– Stephen Kitt
10 hours ago
yes I know, I just needed to see it stated :) Thanks
– Gabriele Scarlatti
10 hours ago
yes I know, I just needed to see it stated :) Thanks
– Gabriele Scarlatti
10 hours ago
add a comment |
Memory pages swapping (you call it "paging") and Linux kernel modules loading/unloading are two completely different functionalities.
A Linux kernel module can be loaded into the kernel - after that it becomes a part of the kernel. The goal here is to adjust the kernel to a given hardware. For example, there are hundreds of types of network cards, and there are many kernel modules, which support these cards - but on any particular machine at any given moment you'll have only one type of network card. The Linux chooses the right kernel module for this card and loads it, leaving all the other modules in the external memory.
For more information about kernel modules please read here.
So kernel modules aren't swapped in and out? Altough Iit seemed to me that it happens in windows, are they different (windows and linux) on that?
– Gabriele Scarlatti
11 hours ago
Moreover the second answer to this post unix.stackexchange.com/questions/65481/… seems to imply that Linux kernel modules can be loaded and unloaded on demand, isn't this a form page swap?
– Gabriele Scarlatti
11 hours ago
After the kernel module is loaded it becomes a part of the kernel, so it can't be swapped out. I have no idea about Windows internals
– HEKTO
10 hours ago
Modules are typically loaded during the system boot, but there are no such restriction. No, it's not a form of swapping - the system swaps memory page by page, not module by module
– HEKTO
10 hours ago
So, why is "paging" wrong? At least by some sources, "swapping" refers to swapping out whole programs at a time, while "paging" refers to doing essentially the same but a page at a time.
– ilkkachu
10 hours ago
|
show 1 more comment
Memory pages swapping (you call it "paging") and Linux kernel modules loading/unloading are two completely different functionalities.
A Linux kernel module can be loaded into the kernel - after that it becomes a part of the kernel. The goal here is to adjust the kernel to a given hardware. For example, there are hundreds of types of network cards, and there are many kernel modules, which support these cards - but on any particular machine at any given moment you'll have only one type of network card. The Linux chooses the right kernel module for this card and loads it, leaving all the other modules in the external memory.
For more information about kernel modules please read here.
So kernel modules aren't swapped in and out? Altough Iit seemed to me that it happens in windows, are they different (windows and linux) on that?
– Gabriele Scarlatti
11 hours ago
Moreover the second answer to this post unix.stackexchange.com/questions/65481/… seems to imply that Linux kernel modules can be loaded and unloaded on demand, isn't this a form page swap?
– Gabriele Scarlatti
11 hours ago
After the kernel module is loaded it becomes a part of the kernel, so it can't be swapped out. I have no idea about Windows internals
– HEKTO
10 hours ago
Modules are typically loaded during the system boot, but there are no such restriction. No, it's not a form of swapping - the system swaps memory page by page, not module by module
– HEKTO
10 hours ago
So, why is "paging" wrong? At least by some sources, "swapping" refers to swapping out whole programs at a time, while "paging" refers to doing essentially the same but a page at a time.
– ilkkachu
10 hours ago
|
show 1 more comment
Memory pages swapping (you call it "paging") and Linux kernel modules loading/unloading are two completely different functionalities.
A Linux kernel module can be loaded into the kernel - after that it becomes a part of the kernel. The goal here is to adjust the kernel to a given hardware. For example, there are hundreds of types of network cards, and there are many kernel modules, which support these cards - but on any particular machine at any given moment you'll have only one type of network card. The Linux chooses the right kernel module for this card and loads it, leaving all the other modules in the external memory.
For more information about kernel modules please read here.
Memory pages swapping (you call it "paging") and Linux kernel modules loading/unloading are two completely different functionalities.
A Linux kernel module can be loaded into the kernel - after that it becomes a part of the kernel. The goal here is to adjust the kernel to a given hardware. For example, there are hundreds of types of network cards, and there are many kernel modules, which support these cards - but on any particular machine at any given moment you'll have only one type of network card. The Linux chooses the right kernel module for this card and loads it, leaving all the other modules in the external memory.
For more information about kernel modules please read here.
edited 10 hours ago
answered 11 hours ago
HEKTOHEKTO
2482 silver badges11 bronze badges
2482 silver badges11 bronze badges
So kernel modules aren't swapped in and out? Altough Iit seemed to me that it happens in windows, are they different (windows and linux) on that?
– Gabriele Scarlatti
11 hours ago
Moreover the second answer to this post unix.stackexchange.com/questions/65481/… seems to imply that Linux kernel modules can be loaded and unloaded on demand, isn't this a form page swap?
– Gabriele Scarlatti
11 hours ago
After the kernel module is loaded it becomes a part of the kernel, so it can't be swapped out. I have no idea about Windows internals
– HEKTO
10 hours ago
Modules are typically loaded during the system boot, but there are no such restriction. No, it's not a form of swapping - the system swaps memory page by page, not module by module
– HEKTO
10 hours ago
So, why is "paging" wrong? At least by some sources, "swapping" refers to swapping out whole programs at a time, while "paging" refers to doing essentially the same but a page at a time.
– ilkkachu
10 hours ago
|
show 1 more comment
So kernel modules aren't swapped in and out? Altough Iit seemed to me that it happens in windows, are they different (windows and linux) on that?
– Gabriele Scarlatti
11 hours ago
Moreover the second answer to this post unix.stackexchange.com/questions/65481/… seems to imply that Linux kernel modules can be loaded and unloaded on demand, isn't this a form page swap?
– Gabriele Scarlatti
11 hours ago
After the kernel module is loaded it becomes a part of the kernel, so it can't be swapped out. I have no idea about Windows internals
– HEKTO
10 hours ago
Modules are typically loaded during the system boot, but there are no such restriction. No, it's not a form of swapping - the system swaps memory page by page, not module by module
– HEKTO
10 hours ago
So, why is "paging" wrong? At least by some sources, "swapping" refers to swapping out whole programs at a time, while "paging" refers to doing essentially the same but a page at a time.
– ilkkachu
10 hours ago
So kernel modules aren't swapped in and out? Altough Iit seemed to me that it happens in windows, are they different (windows and linux) on that?
– Gabriele Scarlatti
11 hours ago
So kernel modules aren't swapped in and out? Altough Iit seemed to me that it happens in windows, are they different (windows and linux) on that?
– Gabriele Scarlatti
11 hours ago
Moreover the second answer to this post unix.stackexchange.com/questions/65481/… seems to imply that Linux kernel modules can be loaded and unloaded on demand, isn't this a form page swap?
– Gabriele Scarlatti
11 hours ago
Moreover the second answer to this post unix.stackexchange.com/questions/65481/… seems to imply that Linux kernel modules can be loaded and unloaded on demand, isn't this a form page swap?
– Gabriele Scarlatti
11 hours ago
After the kernel module is loaded it becomes a part of the kernel, so it can't be swapped out. I have no idea about Windows internals
– HEKTO
10 hours ago
After the kernel module is loaded it becomes a part of the kernel, so it can't be swapped out. I have no idea about Windows internals
– HEKTO
10 hours ago
Modules are typically loaded during the system boot, but there are no such restriction. No, it's not a form of swapping - the system swaps memory page by page, not module by module
– HEKTO
10 hours ago
Modules are typically loaded during the system boot, but there are no such restriction. No, it's not a form of swapping - the system swaps memory page by page, not module by module
– HEKTO
10 hours ago
So, why is "paging" wrong? At least by some sources, "swapping" refers to swapping out whole programs at a time, while "paging" refers to doing essentially the same but a page at a time.
– ilkkachu
10 hours ago
So, why is "paging" wrong? At least by some sources, "swapping" refers to swapping out whole programs at a time, while "paging" refers to doing essentially the same but a page at a time.
– ilkkachu
10 hours ago
|
show 1 more comment
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f531554%2fare-linux-kernel-modules-a-sort-of-linux-system-paged-pool%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown