Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752377AbdFLOKP (ORCPT ); Mon, 12 Jun 2017 10:10:15 -0400 Received: from mga06.intel.com ([134.134.136.31]:28772 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056AbdFLOKO (ORCPT ); Mon, 12 Jun 2017 10:10:14 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,333,1493708400"; d="scan'208";a="979765515" Subject: Re: [PATCH v11 4/6] mm: function to offer a page block on the free list To: Wei Wang , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org, mst@redhat.com, david@redhat.com, cornelia.huck@de.ibm.com, akpm@linux-foundation.org, mgorman@techsingularity.net, aarcange@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com, liliang.opensource@gmail.com References: <1497004901-30593-1-git-send-email-wei.w.wang@intel.com> <1497004901-30593-5-git-send-email-wei.w.wang@intel.com> From: Dave Hansen Message-ID: Date: Mon, 12 Jun 2017 07:10:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1497004901-30593-5-git-send-email-wei.w.wang@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1015 Lines: 23 Please stop cc'ing me on things also sent to closed mailing lists (virtio-dev@lists.oasis-open.org). I'm happy to review things on open lists, but I'm not fond of the closed lists bouncing things at me. On 06/09/2017 03:41 AM, Wei Wang wrote: > Add a function to find a page block on the free list specified by the > caller. Pages from the page block may be used immediately after the > function returns. The caller is responsible for detecting or preventing > the use of such pages. This description doesn't tell me very much about what's going on here. Neither does the comment. "Pages from the page block may be used immediately after the function returns". Used by who? Does the "may" here mean that it is OK, or is it a warning that the contents will be thrown away immediately? The hypervisor is going to throw away the contents of these pages, right? As soon as the spinlock is released, someone can allocate a page, and put good data in it. What keeps the hypervisor from throwing away good data?