From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-dev-return-2392-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [66.179.20.138]) by lists.oasis-open.org (Postfix) with ESMTP id 8CFC25819307 for ; Thu, 13 Jul 2017 01:39:25 -0700 (PDT) Message-ID: <59673252.7090203@intel.com> Date: Thu, 13 Jul 2017 16:41:54 +0800 From: Wei Wang MIME-Version: 1.0 References: <1499863221-16206-1-git-send-email-wei.w.wang@intel.com> <1499863221-16206-8-git-send-email-wei.w.wang@intel.com> <20170713031526-mutt-send-email-mst@kernel.org> In-Reply-To: <20170713031526-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [virtio-dev] Re: [PATCH v12 7/8] mm: export symbol of next_zone and first_online_pgdat To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org, 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, virtio-dev@lists.oasis-open.org, yang.zhang.wz@gmail.com, quan.xu@aliyun.com List-ID: On 07/13/2017 08:16 AM, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 08:40:20PM +0800, Wei Wang wrote: >> This patch enables for_each_zone()/for_each_populated_zone() to be >> invoked by a kernel module. > ... for use by virtio balloon. With this patch, other kernel modules can also use the for_each_zone(). Would it be better to claim it broader? > >> Signed-off-by: Wei Wang > balloon seems to only use > + for_each_populated_zone(zone) > + for_each_migratetype_order(order, type) > Yes. using for_each_populated_zone() requires the following export. Best, Wei >> --- >> mm/mmzone.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/mm/mmzone.c b/mm/mmzone.c >> index a51c0a6..08a2a3a 100644 >> --- a/mm/mmzone.c >> +++ b/mm/mmzone.c >> @@ -13,6 +13,7 @@ struct pglist_data *first_online_pgdat(void) >> { >> return NODE_DATA(first_online_node); >> } >> +EXPORT_SYMBOL_GPL(first_online_pgdat); >> >> struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) >> { >> @@ -41,6 +42,7 @@ struct zone *next_zone(struct zone *zone) >> } >> return zone; >> } >> +EXPORT_SYMBOL_GPL(next_zone); >> >> static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) >> { >> -- >> 2.7.4 > --------------------------------------------------------------------- > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org > --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang Subject: Re: [virtio-dev] Re: [PATCH v12 7/8] mm: export symbol of next_zone and first_online_pgdat Date: Thu, 13 Jul 2017 16:41:54 +0800 Message-ID: <59673252.7090203@intel.com> References: <1499863221-16206-1-git-send-email-wei.w.wang@intel.com> <1499863221-16206-8-git-send-email-wei.w.wang@intel.com> <20170713031526-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org, 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, virtio-dev@lists.oasis-open.org, yang.zhang.wz@gmail.com, quan.xu@aliyun.com To: "Michael S. Tsirkin" Return-path: In-Reply-To: <20170713031526-mutt-send-email-mst@kernel.org> Sender: owner-linux-mm@kvack.org List-Id: kvm.vger.kernel.org On 07/13/2017 08:16 AM, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 08:40:20PM +0800, Wei Wang wrote: >> This patch enables for_each_zone()/for_each_populated_zone() to be >> invoked by a kernel module. > ... for use by virtio balloon. With this patch, other kernel modules can also use the for_each_zone(). Would it be better to claim it broader? > >> Signed-off-by: Wei Wang > balloon seems to only use > + for_each_populated_zone(zone) > + for_each_migratetype_order(order, type) > Yes. using for_each_populated_zone() requires the following export. Best, Wei >> --- >> mm/mmzone.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/mm/mmzone.c b/mm/mmzone.c >> index a51c0a6..08a2a3a 100644 >> --- a/mm/mmzone.c >> +++ b/mm/mmzone.c >> @@ -13,6 +13,7 @@ struct pglist_data *first_online_pgdat(void) >> { >> return NODE_DATA(first_online_node); >> } >> +EXPORT_SYMBOL_GPL(first_online_pgdat); >> >> struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) >> { >> @@ -41,6 +42,7 @@ struct zone *next_zone(struct zone *zone) >> } >> return zone; >> } >> +EXPORT_SYMBOL_GPL(next_zone); >> >> static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) >> { >> -- >> 2.7.4 > --------------------------------------------------------------------- > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org > -- 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/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751329AbdGMIj0 (ORCPT ); Thu, 13 Jul 2017 04:39:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:43616 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbdGMIjZ (ORCPT ); Thu, 13 Jul 2017 04:39:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,353,1496127600"; d="scan'208";a="1151086833" Message-ID: <59673252.7090203@intel.com> Date: Thu, 13 Jul 2017 16:41:54 +0800 From: Wei Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Michael S. Tsirkin" CC: linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org, 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, virtio-dev@lists.oasis-open.org, yang.zhang.wz@gmail.com, quan.xu@aliyun.com Subject: Re: [virtio-dev] Re: [PATCH v12 7/8] mm: export symbol of next_zone and first_online_pgdat References: <1499863221-16206-1-git-send-email-wei.w.wang@intel.com> <1499863221-16206-8-git-send-email-wei.w.wang@intel.com> <20170713031526-mutt-send-email-mst@kernel.org> In-Reply-To: <20170713031526-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/13/2017 08:16 AM, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 08:40:20PM +0800, Wei Wang wrote: >> This patch enables for_each_zone()/for_each_populated_zone() to be >> invoked by a kernel module. > ... for use by virtio balloon. With this patch, other kernel modules can also use the for_each_zone(). Would it be better to claim it broader? > >> Signed-off-by: Wei Wang > balloon seems to only use > + for_each_populated_zone(zone) > + for_each_migratetype_order(order, type) > Yes. using for_each_populated_zone() requires the following export. Best, Wei >> --- >> mm/mmzone.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/mm/mmzone.c b/mm/mmzone.c >> index a51c0a6..08a2a3a 100644 >> --- a/mm/mmzone.c >> +++ b/mm/mmzone.c >> @@ -13,6 +13,7 @@ struct pglist_data *first_online_pgdat(void) >> { >> return NODE_DATA(first_online_node); >> } >> +EXPORT_SYMBOL_GPL(first_online_pgdat); >> >> struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) >> { >> @@ -41,6 +42,7 @@ struct zone *next_zone(struct zone *zone) >> } >> return zone; >> } >> +EXPORT_SYMBOL_GPL(next_zone); >> >> static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) >> { >> -- >> 2.7.4 > --------------------------------------------------------------------- > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVZel-00024X-2r for qemu-devel@nongnu.org; Thu, 13 Jul 2017 04:39:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVZeh-00086f-4z for qemu-devel@nongnu.org; Thu, 13 Jul 2017 04:39:31 -0400 Received: from mga02.intel.com ([134.134.136.20]:6997) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVZeg-00083u-QJ for qemu-devel@nongnu.org; Thu, 13 Jul 2017 04:39:27 -0400 Message-ID: <59673252.7090203@intel.com> Date: Thu, 13 Jul 2017 16:41:54 +0800 From: Wei Wang MIME-Version: 1.0 References: <1499863221-16206-1-git-send-email-wei.w.wang@intel.com> <1499863221-16206-8-git-send-email-wei.w.wang@intel.com> <20170713031526-mutt-send-email-mst@kernel.org> In-Reply-To: <20170713031526-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [virtio-dev] Re: [PATCH v12 7/8] mm: export symbol of next_zone and first_online_pgdat List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org, 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, virtio-dev@lists.oasis-open.org, yang.zhang.wz@gmail.com, quan.xu@aliyun.com On 07/13/2017 08:16 AM, Michael S. Tsirkin wrote: > On Wed, Jul 12, 2017 at 08:40:20PM +0800, Wei Wang wrote: >> This patch enables for_each_zone()/for_each_populated_zone() to be >> invoked by a kernel module. > ... for use by virtio balloon. With this patch, other kernel modules can also use the for_each_zone(). Would it be better to claim it broader? > >> Signed-off-by: Wei Wang > balloon seems to only use > + for_each_populated_zone(zone) > + for_each_migratetype_order(order, type) > Yes. using for_each_populated_zone() requires the following export. Best, Wei >> --- >> mm/mmzone.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/mm/mmzone.c b/mm/mmzone.c >> index a51c0a6..08a2a3a 100644 >> --- a/mm/mmzone.c >> +++ b/mm/mmzone.c >> @@ -13,6 +13,7 @@ struct pglist_data *first_online_pgdat(void) >> { >> return NODE_DATA(first_online_node); >> } >> +EXPORT_SYMBOL_GPL(first_online_pgdat); >> >> struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) >> { >> @@ -41,6 +42,7 @@ struct zone *next_zone(struct zone *zone) >> } >> return zone; >> } >> +EXPORT_SYMBOL_GPL(next_zone); >> >> static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) >> { >> -- >> 2.7.4 > --------------------------------------------------------------------- > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org >