Re: git: kernel - Optimize the x86-64 lwbuf API
The optimization is cute, almost devolves this into an assignment, but
this new API is quite terrible imo, there must be a cleaner way to do
this.
Sam
On Wed, Jan 19, 2011 at 6:29 PM, Matthew Dillon
<dillon@crater.dragonflybsd.org> wrote:
>
> commit 7a683a249a628667d7a484f26af36786efbdd87f
> Author: Matthew Dillon <dillon@apollo.backplane.com>
> Date: ꀠWed Jan 19 17:27:46 2011 -0800
>
> ꀠ溆ernel - Optimize the x86-64 lwbuf API
>
> ꀠꀪ Change lwbuf_alloc(m) to lwbuf_alloc(m, &lwb_cache), passing a pointer to
> ꀠꀠ乸 struct lwb which lwbuf_alloc() may used if it desires.
>
> ꀠꀪ The x86-64 lwbuf_alloc() now just fills in the passed lwb and returns it.
> ꀠꀠ糍he i386 lwbuf_alloc() still uses the objcache w/ its kva mappings. 糍his
> ꀠꀠ澑emoves objcache calls from the critical path.
>
> ꀠꀪ The x86-64 lwbuf_alloc()/lwbuf_free() functions are now inlines (ALL x86-64
> ꀠꀠ溻wbuf functions are now inlines).
>
> Summary of changes:
> 澵ys/cpu/i386/include/lwbuf.h ꀠꀠꀠꀠꀠꀠ| ꀠꀲ +-
> 澵ys/cpu/i386/misc/lwbuf.c ꀠꀠꀠꀠꀠꀠꀠ煺 ꀠꀲ +-
> 澵ys/cpu/x86_64/include/lwbuf.h ꀠꀠꀠꀠꀠ| ꀠ37 ++++++++++++++++++++++-------
> 澵ys/cpu/x86_64/misc/lwbuf.c ꀠꀠꀠꀠꀠꀠ煺 ꀠ25 +++++++++++++------
> 澵ys/kern/imgact_elf.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠ煺 ꀠꀶ ++++-
> 澵ys/kern/kern_exec.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ| ꀠꀳ +-
> 澵ys/kern/kern_sfbuf.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠ煺 ꀠꀲ +-
> 澵ys/kern/kern_subr.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ| ꀠꀳ +-
> 澵ys/kern/kern_umtx.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ| ꀠꀵ ++-
> 澵ys/kern/kern_xio.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ煺 ꀠ12 ++++++---
> 澵ys/platform/vkernel/platform/copyio.c ꀠ| ꀠꀶ +++-
> 澵ys/platform/vkernel64/platform/copyio.c | ꀠꀶ +++-
> 澵ys/sys/imgact.h ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ| ꀠꀲ +
> 澵ys/sys/sfbuf.h ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ煺 ꀠꀵ ++-
> 澵ys/vm/vm_fault.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ煺 ꀠꀳ +-
> 澵ys/vm/vm_zeroidle.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ| ꀠꀹ ++++---
> 澵ys/vm/vnode_pager.c ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ| ꀠꀳ +-
> ꀱ7 files changed, 90 insertions(+), 41 deletions(-)
>
> http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7a683a249a628667d7a484f26af36786efbdd87f
>
>
> --
> DragonFly BSD source repository
>
討論串 (同標題文章)
完整討論串 (本文為第 2 之 3 篇):