Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp475400imm; Wed, 6 Jun 2018 00:24:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIuTJW2zjN6kpNGfZebsvkOrrEjYfJ0X0LSwXLUJzn4rhYLn1MaqaBaxeSuoZ6v0oVicJjE X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr1625211pgf.319.1528269893907; Wed, 06 Jun 2018 00:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528269893; cv=none; d=google.com; s=arc-20160816; b=uNZbsS07MQbiFF0X79LAyBMdRbat3pSXzx0GfuLmK2ih+NqjmCDPIVwknIXJTbaMQA jLioMeXmiHA9pmEnMtxjEfYKIjUXNwLHZDRiizJguBbiCXg+RM+FyaOx2sNlDY3tXx3Y HPY6/Skb/QtZDJ30XEZArHStsZTyxF2fSLTBHiZAqyrPZRSk30PQkbJlNzii1AS3AWca QI90Yd20IP6AfK6IJqPIDUxD76qWui+RwIMX4NXIrL9MU02/+7VYfl9d8XbgR8zUeyXH +/WOxxwfRUgQBHcnUDQQdtEcrjj1B8bFzIgRRywQG90+TrV7AutPolRO0JZEt1usQT4u q7ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=a99Xejn0ZkbjsolSFZXhUACNVySMvTrua4po4LD3E4k=; b=WjldoKUyMbNsofGjB2OrfElCwQUgzrAalKUSkKjjD+pOVQ/0irLug+nvZdqmGplLAU R4W2zqUJ62TebEWCiDXHcQ7+Y3FuB/9M+2eNPh0PbqwrW54SDW+l3rg8dSHAwInV/kyt V/LGU5n6+yrMwsXEAW72vJYcqZF4f9SfxLGZz8xJB5nlo/IzTksNMoJjsaHJvBgAJyPK f5ByrfKgCKmJd1OfPlJLr5mjR9XO8pgpxGXv0A9WXru0M4SLaURzocBwbScPiDQrZZ8c oIkRBjDPHGX2B+xMGrxAoHV1gYCU6PIcOKpWp+Ex8GaFok8TPSQFkg7J0Ti+3mrKYtwA YY8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bk3vrBiY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az9-v6si8235150plb.454.2018.06.06.00.24.34; Wed, 06 Jun 2018 00:24:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bk3vrBiY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252AbeFFHYM (ORCPT + 99 others); Wed, 6 Jun 2018 03:24:12 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:38863 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932205AbeFFHYK (ORCPT ); Wed, 6 Jun 2018 03:24:10 -0400 Received: by mail-lf0-f67.google.com with SMTP id i83-v6so7497807lfh.5; Wed, 06 Jun 2018 00:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=a99Xejn0ZkbjsolSFZXhUACNVySMvTrua4po4LD3E4k=; b=bk3vrBiYelKNMRhMLAJrwzS+5q8lMuwY6lBkuHvjdAjPeWoLhEnDdspRSCgmHrdgAC HINEyoIDFxBaqB0EY3Dn5sxa3ZItukYneXQI0soLqjMnKkxWa542m+8lLPQamiuEA5ZW yOB1/JKIrakHrLKcvhxh9syVRsOVxseaUMl1VE8mgB2F7Td9x6BDVVHqMcgmAzi30qfm AUJrfIPeIw+ngmngO3NRqkvd8SxnijLRErGeIhH+lJ5uTk2O2+xMFZuI316LVpJ2gu7D m8fyeSTEk2/KduOAZNMWLRqkUVqMINWUuzRWZzuMASqmBnI0lkdl/u3EPiKIPAmTkU9s I7tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=a99Xejn0ZkbjsolSFZXhUACNVySMvTrua4po4LD3E4k=; b=pNbmzS27+xlR0it1+Oqi4zzmE3sq9Mk2WuhILSJSS/yZ5p19/7AyMWlqi5O8wbqx+P h3SjH1MOcv3Astmax6UrsBSTLiuBeegVSNVoT43tyeX74HB3K1AhXln0/xK2sZZib+qq O0ux3QAMnK1V4EfPM+m3QMUNRyNKwFuGVwSYJ9rh1TMWXjHlqAhxRYNlyG+EyeR45zh3 GCoUP8p86PQkzx2ahEQtXyQ5Nc5OZ5LpRH75P3UW8Y6HMseBkz/qP9lp7FIANenGmz1k U5tWemEQ6RWfmT8YZxMMwawJ+8Y/9Ri0W25WnbAd8xuzFT/0PbyEfLcYVuC0n066UXhU kx9w== X-Gm-Message-State: APt69E3y1GGdGzIQdiZe2rcjVuGz07M/k4Am+pzRWF3zZrwcfRGjf23T OgT2bl1aLRchKa4vzsWNO68= X-Received: by 2002:a2e:9b52:: with SMTP id o18-v6mr1220794ljj.49.1528269848839; Wed, 06 Jun 2018 00:24:08 -0700 (PDT) Received: from [10.17.182.9] (ll-55.209.223.85.sovam.net.ua. [85.223.209.55]) by smtp.gmail.com with ESMTPSA id s18-v6sm1247448ljg.87.2018.06.06.00.24.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jun 2018 00:24:07 -0700 (PDT) Subject: Re: [PATCH v2 3/9] xen/balloon: Share common memory reservation routines To: Boris Ostrovsky , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, jgross@suse.com, konrad.wilk@oracle.com Cc: daniel.vetter@intel.com, dongwon.kim@intel.com, matthew.d.roper@intel.com, Oleksandr Andrushchenko References: <20180601114132.22596-1-andr2000@gmail.com> <20180601114132.22596-4-andr2000@gmail.com> <4fd46fd8-f936-1514-06e4-34c5d3ed8960@oracle.com> From: Oleksandr Andrushchenko Message-ID: <05e361c2-c7f3-2f57-908c-e2c9b98b18e7@gmail.com> Date: Wed, 6 Jun 2018 10:24:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <4fd46fd8-f936-1514-06e4-34c5d3ed8960@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/04/2018 07:37 PM, Boris Ostrovsky wrote: > On 06/01/2018 07:41 AM, Oleksandr Andrushchenko wrote: >> diff --git a/include/xen/mem-reservation.h b/include/xen/mem-reservation.h >> new file mode 100644 >> index 000000000000..a727d65a1e61 >> --- /dev/null >> +++ b/include/xen/mem-reservation.h >> @@ -0,0 +1,65 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> + >> +/* >> + * Xen memory reservation utilities. >> + * >> + * Copyright (c) 2003, B Dragovic >> + * Copyright (c) 2003-2004, M Williamson, K Fraser >> + * Copyright (c) 2005 Dan M. Smith, IBM Corporation >> + * Copyright (c) 2010 Daniel Kiper >> + * Copyright (c) 2018 Oleksandr Andrushchenko, EPAM Systems Inc. >> + */ >> + >> +#ifndef _XENMEM_RESERVATION_H >> +#define _XENMEM_RESERVATION_H >> + >> +#include >> +#include >> + >> +#include >> +#include >> + >> +#include >> +#include >> + >> +#ifdef CONFIG_XEN_SCRUB_PAGES >> +void xenmem_reservation_scrub_page(struct page *page); >> +#else >> +static inline void xenmem_reservation_scrub_page(struct page *page) >> +{ >> +} >> +#endif > > Given that this is a wrapper around a single call I'd prefer > > inline void xenmem_reservation_scrub_page(struct page *page) > { > #ifdef CONFIG_XEN_SCRUB_PAGES >     clear_highpage(page); > #endif > } Unfortunately this can't be done because of EXPORT_SYMBOL_GPL(xenmem_reservation_scrub_page); which is obviously cannot be used for static inline functions. So, I'll keep it as is. > > > -boris > > Thank you, Oleksandr