From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758718Ab1FVXpF (ORCPT ); Wed, 22 Jun 2011 19:45:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18155 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757743Ab1FVXpD (ORCPT ); Wed, 22 Jun 2011 19:45:03 -0400 Date: Thu, 23 Jun 2011 01:44:50 +0200 From: Andrea Arcangeli To: Nai Xia Cc: Andrew Morton , Izik Eidus , Hugh Dickins , Chris Wright , Rik van Riel , linux-mm , Johannes Weiner , linux-kernel , kvm Subject: Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking Message-ID: <20110622234450.GB20843@redhat.com> References: <201106212055.25400.nai.xia@gmail.com> <201106212132.39311.nai.xia@gmail.com> <20110622150350.GX20843@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 23, 2011 at 07:19:06AM +0800, Nai Xia wrote: > OK, I'll have a try over other workarounds. > I am not feeling good about need_pte_unmap myself. :-) The usual way is to check VM_HUGETLB in the caller and to call another function that doesn't kmap. Casting pmd_t to pte_t isn't really nice (but hey we're also doing that exceptionally in smaps_pte_range for THP, but it safe there because we're casting the value of the pmd, not the pointer to the pmd, so the kmap is done by the pte version of the caller and not done by the pmd version of the caller). Is it done for migrate? Surely it's not for swapout ;). > Thanks for viewing! You're welcome! JFYI I'll be offline on vacation for a week, starting tomorrow, so if I don't answer in the next few days that's the reason but I'll follow the progress in a week. Thanks! Andrea From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking Date: Thu, 23 Jun 2011 01:44:50 +0200 Message-ID: <20110622234450.GB20843@redhat.com> References: <201106212055.25400.nai.xia@gmail.com> <201106212132.39311.nai.xia@gmail.com> <20110622150350.GX20843@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Izik Eidus , Hugh Dickins , Chris Wright , Rik van Riel , linux-mm , Johannes Weiner , linux-kernel , kvm To: Nai Xia Return-path: Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-Id: kvm.vger.kernel.org On Thu, Jun 23, 2011 at 07:19:06AM +0800, Nai Xia wrote: > OK, I'll have a try over other workarounds. > I am not feeling good about need_pte_unmap myself. :-) The usual way is to check VM_HUGETLB in the caller and to call another function that doesn't kmap. Casting pmd_t to pte_t isn't really nice (but hey we're also doing that exceptionally in smaps_pte_range for THP, but it safe there because we're casting the value of the pmd, not the pointer to the pmd, so the kmap is done by the pte version of the caller and not done by the pmd version of the caller). Is it done for migrate? Surely it's not for swapout ;). > Thanks for viewing! You're welcome! JFYI I'll be offline on vacation for a week, starting tomorrow, so if I don't answer in the next few days that's the reason but I'll follow the progress in a week. Thanks! Andrea -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org