mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Pekka Enberg" <penberg@cs.helsinki.fi>
Cc: "Michael Tokarev" <mjt@tls.msk.ru>,
	"Shani Moideen" <shani.moideen@wipro.com>,
	ebiederm@xmission.com, linux-kernel@vger.kernel.org,
	kernel-janitors@lists.osdl.org
Subject: Re: [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in kernel/kexec.c
Date: Tue, 8 May 2007 10:13:52 -0700	[thread overview]
Message-ID: <a781481a0705081013q7b54906dsdf28d922e198a463@mail.gmail.com> (raw)
In-Reply-To: <84144f020705080521k6d75d9f8m33e25585735e4f7e@mail.gmail.com>

On 5/8/07, Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> Shani Moideen wrote:
> > >                 ptr = kmap(page);
> > > -               memset(ptr, 0, PAGE_SIZE);
> > > +               clear_page(ptr);
>
> On 5/8/07, Michael Tokarev <mjt@tls.msk.ru> wrote:
> > I wonder if it's worth to invent kzmap() or something like that... ;)
>
> I am counting 59 kmap + memset pairs in the kernel, so perhaps it is
> worth it to reduce kernel text size.

Stuff of the sort already exists. Look for clear_highpage(),
clear_user_highpage() and memclear_highpage_flush (recently renamed to
zero_user_page, see -mm). But they all use kmap_atomic() -- kmap()
variants would have to be added. Also, they're all inlines, so I'm not
sure you'd be able to cut down text size, but still getting rid of
open-coding is always good.

  reply	other threads:[~2007-05-08 17:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 10:50 Shani Moideen
2007-05-08 11:10 ` Michael Tokarev
2007-05-08 12:21   ` Pekka Enberg
2007-05-08 17:13     ` Satyam Sharma [this message]
2007-05-08 17:40       ` Eric W. Biederman

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=a781481a0705081013q7b54906dsdf28d922e198a463@mail.gmail.com \
    --to=satyam.sharma@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --cc=penberg@cs.helsinki.fi \
    --cc=shani.moideen@wipro.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®