From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH 4/4] add ksm kernel shared memory driver. Date: Thu, 16 Apr 2009 09:08:42 -0700 Message-ID: <49E7580A.1080903@goop.org> References: <1239249521-5013-1-git-send-email-ieidus@redhat.com> <1239249521-5013-2-git-send-email-ieidus@redhat.com> <1239249521-5013-3-git-send-email-ieidus@redhat.com> <1239249521-5013-4-git-send-email-ieidus@redhat.com> <1239249521-5013-5-git-send-email-ieidus@redhat.com> <20090414150929.174a9b25.akpm@linux-foundation.org> <49E67F17.1070805@goop.org> <20090416113931.GF4524@random.random> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andrew Morton , Izik Eidus , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, avi@redhat.com, chrisw@redhat.com, mtosatti@redhat.com, hugh@veritas.com, kamezawa.hiroyu@jp.fujitsu.com To: Andrea Arcangeli Return-path: Received: from gw.goop.org ([64.81.55.164]:56516 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753582AbZDPQIs (ORCPT ); Thu, 16 Apr 2009 12:08:48 -0400 In-Reply-To: <20090416113931.GF4524@random.random> Sender: kvm-owner@vger.kernel.org List-ID: Andrea Arcangeli wrote: > On Wed, Apr 15, 2009 at 05:43:03PM -0700, Jeremy Fitzhardinge wrote: > >> Shouldn't that be kmap_atomic's job anyway? Otherwise it would be hard to >> > > No because those are full noops in no-highmem kernels. I commented in > other email why I think it's safe thanks to the wrprotect + smp tlb > flush of the userland PTE. > I think Andrew's query was about data cache synchronization in architectures with virtually indexed d-cache. On x86 it's a non-issue, but on architectures for which it is an issue, I assume kmap_atomic does any necessary cache flushes, as it does tlb flushes on x86 (which may be none at all, if no mapping actually happens). J