All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Ken Chen" <kenchen@google.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] cache pipe buf page address for non-highmem arch
Date: Mon, 26 Mar 2007 20:15:52 -0800	[thread overview]
Message-ID: <20070326201552.b8ad7dda.akpm@linux-foundation.org> (raw)
In-Reply-To: <b040c32a0703231748s112beda6i3d51ebcd658005c4@mail.gmail.com>

On Fri, 23 Mar 2007 17:48:29 -0700 "Ken Chen" <kenchen@google.com> wrote:

> It is really sad that we always call kmap and friends for every pipe
> buffer page on 64-bit arch that doesn't use HIGHMEM, or on
> configuration that doesn't turn on HIGHMEM.
> 
> The effect of calling kmap* is visible in the execution profile when
> pipe code is being stressed.  It is especially true on amd's x86-64
> platform where kmap() has to traverse through numa node index
> calculation in order to convert struct page * to kernel virtual
> address.  It is fairly pointless to perform that calculation repeatly
> on system with no highmem (i.e., 64-bit arch like x86-64).  This patch
> caches kernel pipe buffer page's kernel vaddr to speed up pipe buffer
> mapping functions.

LTP's vmsplice01 triggers the below:

VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 200k freed
Unable to find swap-space signature
Unable to handle kernel NULL pointer dereference at 0000000000000130 RIP: 
 [<ffffffff8029e1b6>] pipe_to_file+0x1f3/0x2a6
PGD 10389d067 PUD 10107b067 PMD 0 
Oops: 0000 [1] PREEMPT SMP 
last sysfs file: devices/pci0000:00/0000:00:1d.7/usb1/dev
CPU 3 
Modules linked in: pcmcia firmware_class yenta_socket rsrc_nonstatic pcmcia_core
Pid: 18708, comm: vmsplice01 Not tainted 2.6.21-rc5-mm1 #2
RIP: 0010:[<ffffffff8029e1b6>]  [<ffffffff8029e1b6>] pipe_to_file+0x1f3/0x2a6
RSP: 0018:ffff81010448dd48  EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000ed0
RDX: ffff81010448dfd8 RSI: 0000000000000130 RDI: ffff810170149000
RBP: ffff81010448dda8 R08: 0000000000000004 R09: ffff810102657d40
R10: 0000000000001000 R11: 00000000002da01c R12: ffff810006c05240
R13: 0000000000000ed0 R14: ffff810103c56bb0 R15: 0000000000000ed0
FS:  00002af6b3d96b00(0000) GS:ffff810100090b90(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000130 CR3: 000000010384a000 CR4: 00000000000006e0
Process vmsplice01 (pid: 18708, threadinfo ffff81010448c000, task ffff8101045d58f0)
Stack:  000000000000000e ffff81010448ddc8 ffff810103c56b48 ffff810101168df0
 ffff81010edf9660 0000000003c56b48 0000000000000000 ffff810103c56bb0
 ffff810103c56b48 0000000000000000 0000000000000000 ffffffff804f8380
Call Trace:
 [<ffffffff8029e2d6>] __splice_from_pipe+0x6d/0x1ea
 [<ffffffff8029dfc3>] pipe_to_file+0x0/0x2a6
 [<ffffffff8029dfc3>] pipe_to_file+0x0/0x2a6
 [<ffffffff8029e554>] splice_from_pipe+0x54/0x75
 [<ffffffff8029e611>] generic_file_splice_write+0x8a/0xfc
 [<ffffffff8029dd8d>] do_splice_from+0x72/0x7e
 [<ffffffff8029f274>] sys_splice+0x105/0x216
 [<ffffffff802096fe>] system_call+0x7e/0x83


Code: f3 a4 bf 01 00 00 00 e8 0b a9 f8 ff 65 48 8b 04 25 10 00 00 


  reply	other threads:[~2007-03-27  4:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23  0:51 [patch] cache pipe buf page address for non-highmem arch Ken Chen
2007-03-23  1:01 ` Andrew Morton
2007-03-24  0:48   ` Ken Chen
2007-03-27  4:15     ` Andrew Morton [this message]
2007-03-27 17:47       ` Ken Chen
2007-03-27 22:57         ` Zach Brown
2007-03-28 23:14           ` Andrew Morton
2007-03-28 23:21             ` Zach Brown
2007-03-28 23:34               ` Andrew Morton
2007-03-28 23:48                 ` Jeremy Fitzhardinge
2007-03-23 10:14 ` Christoph Hellwig
2007-03-24  1:01   ` Ken Chen
2007-03-24  1:40   ` Benjamin LaHaise
2007-03-27 15:05     ` Andi Kleen
2007-03-27 15:01 ` Andi Kleen
2007-03-27 18:06   ` Ken Chen

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=20070326201552.b8ad7dda.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=kenchen@google.com \
    --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.