From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH 1/1 v2] KVM: Reduce mmu_lock contention during dirty logging by cond_resched() Date: Mon, 30 Apr 2012 23:06:41 +0900 Message-ID: <20120430230641.2fc14229760684d936d7ef58@gmail.com> References: <20120428190544.7dc2bfd281054c1fcac5a14e@gmail.com> <20120428190754.5c27325da5663e5d8c9b9be1@gmail.com> <4F9D25A2.7020303@redhat.com> <20120429211759.0265df80d7193048344ff35b@gmail.com> <4F9D3B26.7090602@redhat.com> <20120429232407.684da454a0862f121754a126@gmail.com> <4F9D52A7.8020105@redhat.com> <20120429235550.856ff62eff954caf9ea739b5@gmail.com> <4F9D5773.4090505@redhat.com> <20120430001330.00ae231245771e482ec9977a@gmail.com> <4F9D5C45.3070801@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp To: Avi Kivity Return-path: Received: from mail-pz0-f51.google.com ([209.85.210.51]:59704 "EHLO mail-pz0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500Ab2D3OGq (ORCPT ); Mon, 30 Apr 2012 10:06:46 -0400 Received: by dadz8 with SMTP id z8so4130249dad.10 for ; Mon, 30 Apr 2012 07:06:46 -0700 (PDT) In-Reply-To: <4F9D5C45.3070801@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 29 Apr 2012 18:20:37 +0300 Avi Kivity wrote: > > - cond_resched_lock() uses spin_needbreak(), and I am not sure if > > this still does rescheduling for alleviating mmu_lock contention > > without CONFIG_PREEMPT. > > IMO that's a feature. If kernel policy is not to lockbreak when > !CONFIG_PREEMPT, then we should follow it, whether it's the right thing > or not. If it's the wrong thing, change it in the kernel proper. Agreed. Anyway, we need to alleviate mmu_lock contention on server machines, where we usually do not select CONFIG_PREEMPT. So I need to check the porpose of this API. > while (1) > need_to_read_the_code_a_bit_more(); It's a pleasure! Thanks, Takuya