lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 May 2015 18:29:55 +0200
From:	Radim Krčmář <rkrcmar@...hat.com>
To:	Bandan Das <bsd@...hat.com>
Cc:	Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, guangrong.xiao@...ux.intel.com,
	Yang Zhang <yang.z.zhang@...el.com>, wanpeng.li@...ux.intel.com
Subject: Re: [PATCH 02/13] KVM: reuse memslot in kvm_write_guest_page

2015-05-05 11:03-0400, Bandan Das:
> Paolo Bonzini <pbonzini@...hat.com> writes:
> 
>> From: Radim Krčmář <rkrcmar@...hat.com>
>>
>> Saves one O(log N) search.
> 
> It really doesn't hurt to change this to:
> "Caching memslot value helps us avoid another O(log N) search
> later when calling mark_page_dirty_in_slot()."
> 
> Sorry I am not a fan of commit messages less than 75 characters :)

Sure, I just couldn't find a message that would be easier to understand
than the code and not misleading at the same time ... what came out was
a teaser for people who care about performance :)

In verbose mode, I'd write it like this:
  gfn_to_hva() and mark_page_dirty() both call gfn_to_memslot().
  We can store a result of gfn_to_memslot() (memslot) and unwrap
  gfn_to_hva() and mark_page_dirty() to directly call functions that
  accept a memslot.
  gfn_to_memslot() does a binary search, so it also saves some cycles.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ