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]
Message-ID: <20120306152850.GB3353@amt.cnet>
Date:	Tue, 6 Mar 2012 12:28:50 -0300
From:	Marcelo Tosatti <mtosatti@...hat.com>
To:	Takuya Yoshikawa <takuya.yoshikawa@...il.com>
Cc:	Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>, avi@...hat.com,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4 changelog-v2] KVM: Switch to srcu-less get_dirty_log()

On Wed, Mar 07, 2012 at 12:23:17AM +0900, Takuya Yoshikawa wrote:
> Marcelo Tosatti <mtosatti@...hat.com> wrote:
> 
> > > If we do not mind scanning the bitmap twice, we can decouple the
> > > xchg loop and write protection, but it will be a bit slower, and in
> > > any case we need to hold mmu_lock until TLB is flushed.
> > 
> > Why is it necessary to scan twice? Simply continuing to the next set 
> > of pages, after dropping the lock, should be enough.
> 
> We cannot drop the lock.
> Do you mean doing TLB flush each time before dropping the lock?

Yes, only if there is contention (see cond_resched_lock).

> > The potential problem i am referring to is:
> > 
> > - kvm.git next + srcu-less series
> > average(ns)    stdev     ns/page    pages    improvement(%)
> > 
> > 8497356.4    16441.0        32.4     256K     -29
> > 
> > So 8ms for 1GB. Assuming it increases linearly, it would take 
> > 400ms for get_dirty on a 50GB slot (most of that time spent 
> > with mmu_lock held). Is this correct?
> 
> Partly yes: my method mainly depends on the number of dirty pages,
> not slot size.
> 
> But it is not a new problem: traversing all shadow pages for that
> also takes linearly increasing time.

It was not necessary to read the bitmap under mmu_lock previously.

> If that 1GB dirty memory is in a 50GB slot, my method will alleviate
> the latency really a lot compared to the current way.  I do not want
> to imagine checking every shadow page in such a huge slot.
> 
> Checking pages found in the dirty bitmap only should be better.
> 
> 	Takuya
--
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