Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1718559imm; Wed, 6 Jun 2018 22:32:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLIP3xlOe7a8hWTw/jIVCkUmT553Si1cruQLDIb0vf8t0bZdhExey8GFS/vyqGHXfbuJWkg X-Received: by 2002:a17:902:26:: with SMTP id 35-v6mr532075pla.276.1528349579182; Wed, 06 Jun 2018 22:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528349579; cv=none; d=google.com; s=arc-20160816; b=AAJLow9exAlffCA2eYZ6wAjek/1zWDVdpytElyR+/M07FDi9X8ul5UlQqSKSXtzIEV xK1omZh7mT+msWPHYxhYtzS/ocP3YcKyiRG7oqLfaM6AqUA3mLiKFyUK4dLrf/R2dOW4 XNKBuwYnN5wEGXtwPWfWij9PZnrWfO62QHIIv1oK4zQCD2Am48+xwj8NOdPUaCiOHIho hPTS3T/N5kKZNUjbM/FE5pDemWtILO42KivRg9MnJdVTv40aUPXk9AVUA4gh3A+wSmrt yp1nVCb+FET6l1Y1/wgDaGmO0kCfz6joG/CddrAZWRzCkUbSSnvcQGP7EgoeYAna7GWi ABuQ== 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=tK8dudoPiweUBdvNDqX5okSxvWobIVXaKRjBU+Y/FJw=; b=A6OiLd/iooL1y/VVqh74G10BF9U12EccEC9Nyp7MxFQMCk1jL+vrBAjAdZ4PqHZfzC WQysF5G9/hbTRCtjB7cp5Jc/S52VMa6hQwRfVl095sdizhcE4+d5N/Gsx+5cvfO8Dx2H TKcZctL4M2kcGK8RvwkA1XHYnSQdBF778b166dQFVTXZu2t8zBqFV2lbDJ7fI6Ki7qi4 7FmQ+QHUwZfVoRFnNRWbgoI6SRqhyO+F7+NLhLrWSXZjEqXR1xN/Fz9bQpcWweVr61iV dHubL70gTw9IwnfTDMZsAWqES95TaQLufdNEYb9tSRgD2aaH4nUCbu763abqZg/F+fSJ 06cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TItQtCBd; 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 t128-v6si43277920pgt.368.2018.06.06.22.32.44; Wed, 06 Jun 2018 22:32:59 -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=TItQtCBd; 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 S1752561AbeFGFcS (ORCPT + 99 others); Thu, 7 Jun 2018 01:32:18 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:42214 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751122AbeFGFcQ (ORCPT ); Thu, 7 Jun 2018 01:32:16 -0400 Received: by mail-lf0-f65.google.com with SMTP id v135-v6so12625807lfa.9; Wed, 06 Jun 2018 22:32:16 -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=tK8dudoPiweUBdvNDqX5okSxvWobIVXaKRjBU+Y/FJw=; b=TItQtCBdy3RF3LiO8wG2zMzGY+rGxXEDElraV1V7UwTYizKq63PG+V3EG0922iXg2/ jTQm37kXuGvC3q9Ple8fjDamg/I7xedBnvJWG75toS4eB9clgRp0OEkKWaHOHB5A3Ub3 GP8cMj5PdPeeBQXSYuKjeizzoJfmVST7r6wPJqtxk5J+8S30+y6uELGfOTulWCNnmYx3 VAd5wcEELa4MBJ9UwScgF30Vxy7bwk7T653h3z/Ms8TyNiP1gMaVTWEVpCul1t0r4Tuj cdRg8FN1G6VHlTI7Yc+x2xnfMusG94sxaAiRvMKlpijlm9e0rMD39IhF2A+sivpH91Xf mXyQ== 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=tK8dudoPiweUBdvNDqX5okSxvWobIVXaKRjBU+Y/FJw=; b=Wn0FLoaYo3dtCG0FTZINkI7QUUSTotilclmiZ6E/pat0yCvWVOL5m/tkV0T0qXFvca Jg+m1z2oOUkyowTxm5d3urkCQp20moby5WIgNdU12nT7cLpjmfAk8uBvNQbXcf77pjAl nRKYWorQWuywC9VYcopnkP3IlnAo3qgDwsP3e+n0dorN6h1hH8cql/5SO+/HoGqiLFPV e9bfd/aWqUrpBruw+GSolMBVD+K71/z0zVnPy/53Zy76EHjvtEsoiPrvHibWqMdrfFdr cUnH4ielbp19HmNI5UdZZK+1i0pFFoej1CXVGqJx5kKt6eKbybNGLHC4g/Hfwy45NpaZ bXtw== X-Gm-Message-State: APt69E0uTLgAvHi+EXjDKXaKF3X+Mi/iMTP/K1JZ5WNMQrkNj/cf+Nk5 +kTWqefUTZ4hGw8eA3A0xwk= X-Received: by 2002:a19:e9d3:: with SMTP id j80-v6mr277357lfk.129.1528349535018; Wed, 06 Jun 2018 22:32:15 -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 i5-v6sm2197768lfc.83.2018.06.06.22.32.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jun 2018 22:32:14 -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> <05e361c2-c7f3-2f57-908c-e2c9b98b18e7@gmail.com> <6cba4317-b517-3e12-ba1b-3ccbe414ada0@oracle.com> From: Oleksandr Andrushchenko Message-ID: <9298e775-e5b2-b3b3-dfca-6d1ec66efbfc@gmail.com> Date: Thu, 7 Jun 2018 08:32:13 +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: <6cba4317-b517-3e12-ba1b-3ccbe414ada0@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/07/2018 12:09 AM, Boris Ostrovsky wrote: > On 06/06/2018 03:24 AM, Oleksandr Andrushchenko wrote: >> 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. > > > Why do you need to export it? It's an inline defined in the header file. > Just like clear_highpage(). You are perfectly right, will change as you suggest > > -boris Thank you, Oleksandr >> So, I'll keep it as is. >>> >>> -boris >>> >>> >> Thank you, >> Oleksandr