Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Does the kernel code run through the MMU and page tables?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
xu_feng...@yahoo.com  
View profile  
 More options Nov 15 2006, 10:25 am
Newsgroups: comp.os.linux.development.system
From: xu_feng...@yahoo.com
Date: 14 Nov 2006 15:25:30 -0800
Local: Wed, Nov 15 2006 10:25 am
Subject: Does the kernel code run through the MMU and page tables?
Hi,
Does the kernel code run through the MMU and page tables?

My expectation was No as among others there is no need to relocate
dynamically the kernel code and associated data if paging for instance
is used.  The kernel code consists of a set of pre known processes that
are loaded in a pre-set area in the memory. If the code runs through
MMU and page tables, this will slow down the kernel code execution.

 I read that in the coming 64-bit machine, inverted page table will be
used to do the translation. If
the kernel code is running through the MMU and inverted page table, do
the systems allocate a single "inverted page table" for both user
processes and  kernel processes or instead one for each type

thanks


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael  
View profile  
 More options Nov 15 2006, 11:30 am
Newsgroups: comp.os.linux.development.system
From: "Michael" <arm...@dtk.com.tw>
Date: 14 Nov 2006 16:30:11 -0800
Local: Wed, Nov 15 2006 11:30 am
Subject: Re: Does the kernel code run through the MMU and page tables?
for x86, yes
when the protected mode is set, the MMU works. and all addresses are
required to be translated into physical address, even the kernel. Read
System.map and the link script in arch/i386/kernel/, the answer is
there.

"xu_feng...@yahoo.com 写道:
"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kaz Kylheku  
View profile  
 More options Nov 15 2006, 5:28 pm
Newsgroups: comp.os.linux.development.system
From: "Kaz Kylheku" <kkylh...@gmail.com>
Date: 14 Nov 2006 22:28:11 -0800
Local: Wed, Nov 15 2006 5:28 pm
Subject: Re: Does the kernel code run through the MMU and page tables?

xu_feng...@yahoo.com wrote:
> Hi,
> Does the kernel code run through the MMU and page tables?

Yes, on simple architectures that don't implement kernel segments. On
some architectures like i386, virtual memory is an all-or-nothing
proposition. Either all addresses generated by the CPU are subject to
virtual address translation through the TLB and page tables, or all
addresses are just physical.

On some architectures, the address space can be partitioned. A given
slice may be subject to paging, and other slices to some
straightforward displacement to their corresponding physical range.

> My expectation was No as among others there is no need to relocate
> dynamically the kernel code and associated data if paging for instance
> is used.

The kernel works with virtual addresses transparently. A given pointer
variable could for example point to user-space virtual memory, kernel
virtual memory from vmalloc, a static object, a location on a kernel
stack, or to memory from kmalloc. They all work uniformly.

On the i386, they all go through the MMU. On a different architecture
like MIPS, the translation of the address by the hardware, and even the
semantics of the access, depend on which segment of the address space
it falls into.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josef Moellers  
View profile  
 More options Nov 15 2006, 6:42 pm
Newsgroups: comp.os.linux.development.system
From: Josef Moellers <josef.moell...@fujitsu-siemens.com>
Date: Wed, 15 Nov 2006 08:42:09 +0100
Local: Wed, Nov 15 2006 6:42 pm
Subject: Re: Does the kernel code run through the MMU and page tables?

xu_feng...@yahoo.com wrote:
> Hi,
> Does the kernel code run through the MMU and page tables?

> My expectation was No as among others there is no need to relocate
> dynamically the kernel code and associated data if paging for instance
> is used.  The kernel code consists of a set of pre known processes that
> are loaded in a pre-set area in the memory. If the code runs through
> MMU and page tables, this will slow down the kernel code execution.

For one, this set can change over reboots.
Secondly, even the kernel has varying requirements for data storage.
Thirly, as Kaz has pointed out, on x86 its all-or-nothing.
The speed penalty is not as high as you might expect, as not every
access has to go through the tables. A "TLB"
(Translation-Lookaside-Buffer) caches the most recently used address
translations, so only the access to a new page will require walking
through the tables.

--
Josef Möllers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize
                                                -- T.  Pratchett


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Roberts  
View profile  
 More options Nov 15 2006, 8:14 pm
Newsgroups: comp.os.linux.development.system
From: Tim Roberts <t...@probo.com>
Date: Wed, 15 Nov 2006 09:14:13 GMT
Local: Wed, Nov 15 2006 8:14 pm
Subject: Re: Does the kernel code run through the MMU and page tables?

xu_feng...@yahoo.com wrote:

>Does the kernel code run through the MMU and page tables?

>My expectation was No as among others there is no need to relocate
>dynamically the kernel code and associated data if paging for instance
>is used.  The kernel code consists of a set of pre known processes that
>are loaded in a pre-set area in the memory.

The kernel is not a static entity.  Kernel modules and kernel memory come
and go.

>If the code runs through MMU and page tables, this will slow down the
>kernel code execution.

Nope.  As Michael implied, it depends on the processor, but on every
virtual memory processor I've ever used, ALL addresses are virtual
addresses.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Talon  
View profile  
 More options Nov 15 2006, 10:05 pm
Newsgroups: comp.os.linux.development.system
From: ta...@lpthe.jussieu.fr (Michel Talon)
Date: Wed, 15 Nov 2006 11:05:48 +0000 (UTC)
Local: Wed, Nov 15 2006 10:05 pm
Subject: Re: Does the kernel code run through the MMU and page tables?

xu_feng...@yahoo.com wrote:
> Hi,
> Does the kernel code run through the MMU and page tables?

> My expectation was No as among others there is no need to relocate
> dynamically the kernel code and associated data if paging for instance
> is used.  The kernel code consists of a set of pre known processes that
> are loaded in a pre-set area in the memory. If the code runs through
> MMU and page tables, this will slow down the kernel code execution.

What about the fact the kernel is mapped in the adress space of
processes, so that they can run in user mode and kernel mode?

--

Michel TALON


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Roberts  
View profile  
 More options Nov 17 2006, 3:51 pm
Newsgroups: comp.os.linux.development.system
From: Tim Roberts <t...@probo.com>
Date: Fri, 17 Nov 2006 04:51:22 GMT
Local: Fri, Nov 17 2006 3:51 pm
Subject: Re: Does the kernel code run through the MMU and page tables?

ta...@lpthe.jussieu.fr (Michel Talon) wrote:
>xu_feng...@yahoo.com wrote:
>> Hi,
>> Does the kernel code run through the MMU and page tables?

>> My expectation was No as among others there is no need to relocate
>> dynamically the kernel code and associated data if paging for instance
>> is used.  The kernel code consists of a set of pre known processes that
>> are loaded in a pre-set area in the memory. If the code runs through
>> MMU and page tables, this will slow down the kernel code execution.

>What about the fact the kernel is mapped in the adress space of
>processes, so that they can run in user mode and kernel mode?

That's an implementation detail.  It isn't actually required for the Linux
kernel.  You could operate with separate address spaces, as long as there's
a way to implement copy_from_user and copy_to_user.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Schwartz  
View profile  
 More options Nov 18 2006, 10:40 am
Newsgroups: comp.os.linux.development.system
From: "David Schwartz" <dav...@webmaster.com>
Date: 17 Nov 2006 15:40:10 -0800
Local: Sat, Nov 18 2006 10:40 am
Subject: Re: Does the kernel code run through the MMU and page tables?

xu_feng...@yahoo.com wrote:
> My expectation was No as among others there is no need to relocate
> dynamically the kernel code and associated data if paging for instance
> is used.  The kernel code consists of a set of pre known processes that
> are loaded in a pre-set area in the memory. If the code runs through
> MMU and page tables, this will slow down the kernel code execution.

The last sentence is really not true. On modern processors, the MMU and
page table implementations are heavily optimized and impose a
negligible performance penalty.

Even cooler, the mappings for the kernel can be marked global. This
marking will be carried into the caches, so that when a process switch
occurs, those mappings are not expunged from the caches.

DS


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
malc  
View profile  
 More options Nov 18 2006, 12:14 pm
Newsgroups: comp.os.linux.development.system
From: malc <m...@pulsesoft.com>
Date: Sat, 18 Nov 2006 01:14:17 +0000 (UTC)
Local: Sat, Nov 18 2006 12:14 pm
Subject: Re: Does the kernel code run through the MMU and page tables?

"David Schwartz" <dav...@webmaster.com> writes:
> xu_feng...@yahoo.com wrote:

>> My expectation was No as among others there is no need to relocate
>> dynamically the kernel code and associated data if paging for instance
>> is used.  The kernel code consists of a set of pre known processes that
>> are loaded in a pre-set area in the memory. If the code runs through
>> MMU and page tables, this will slow down the kernel code execution.

> The last sentence is really not true. On modern processors, the MMU and
> page table implementations are heavily optimized and impose a
> negligible performance penalty.

http://channel9.msdn.com/ShowPost.aspx?PostID=227259

I think this is this video[1] where Singularity authors claim that
turning on paging (perhaps combined with other "protection/mapping"
features) has far from negligible impact on the system performance (i
gather they use some x86 variant).

Don't think i ever encountered any study (with verifiable results) that
could support either of those views.

[..snip..]

[1] Perhaps the one before this one... or after...

--
vale


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Weikusat  
View profile  
 More options Nov 19 2006, 11:09 pm
Newsgroups: comp.os.linux.development.system
From: Rainer Weikusat <rainer.weiku...@sncag.com>
Date: Sun, 19 Nov 2006 13:09:39 +0100
Local: Sun, Nov 19 2006 11:09 pm
Subject: Re: Does the kernel code run through the MMU and page tables?

If so, somebody should tactfully inform them that "getting baffled by
one's own bullshit" is hardly a thing to be proud of and that
page-based virtual memory implementation have been in use for at least
25 years now, and mostly on computers with less processing power than
a second rate cellphone of today, meaning if they have managed to
write a piece of software which cannot tolerate the overhead imposed
by using a MMU, they should perhaps consider this a hopefully
educating failed experiment.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google