All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Bernd Eckenfels <be-news06@lina.inka.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Red zones
Date: Thu, 26 Jan 2006 06:28:20 +0100	[thread overview]
Message-ID: <43D85DF4.9020703@cosmosbay.com> (raw)
In-Reply-To: <E1F1sSY-0004yP-00@calista.inka.de>

Bernd Eckenfels a écrit :
> Eric Dumazet <dada1@cosmosbay.com> wrote:
>> We can use a red zone big enough to hold the whole per_cpu data.
> 
> I am trying to learn a bit here: why is it required to have a speciel red
> zone for this case? Wouldnt it make more sence to have a single red zone
> which can be used by all locations in the kernel for unused structures? That
> would reduce the number of wasted segements in the page table, or?
>

On x86_64, available virtual space is huge, so having different red zones can 
spot the fault more easily : If the target of the fault is in the PER_CPU 
redzone given range, we can instantly knows there is still a per_cpu() user 
accessing a non possible cpu area. As the red zone is not mapped at all, no 
page table is setup.


On 32 bits platforms, this is completely different : space is scarse (typical 
User/Kernel split of 3GB/1GB), so we should avoid to reserve even a 32 KB 
redzone. We could do it in DEBUG mode for example. Current interim patch in 
2.6.16-rc1-mm3 is using NULL pointer but this is not a perfect solution since 
the underlying current user process can perfectly map something in this 'zone'.

Eric



  reply	other threads:[~2006-01-26  5:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-23 11:21 [PATCH] garbage values in file /proc/net/sockstat pravin shelar
2006-01-23 11:24 ` Andi Kleen
2006-01-23 13:28   ` Eric Dumazet
2006-01-23 15:11     ` Andi Kleen
2006-01-23 16:28       ` Eric Dumazet
2006-01-23 16:46         ` Eric Dumazet
2006-01-25 13:31           ` Andi Kleen
2006-01-25 19:59             ` Ravikiran G Thirumalai
2006-01-25 20:47               ` Ravikiran G Thirumalai
2006-01-26  0:32               ` Andi Kleen
2006-01-25 21:45     ` Red zones (was: [PATCH] garbage values in file /proc/net/sockstat) Bernd Eckenfels
2006-01-26  5:28       ` Eric Dumazet [this message]
2006-01-26 10:07         ` Red zones Bernd Eckenfels

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43D85DF4.9020703@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=be-news06@lina.inka.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.