linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Christophe Harle <charle-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Duncan Poole <dpoole-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Sherry Cheung <SCheung-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Subhash Gutti <sgutti-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	John Hubbard <jhubbard-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Mark Hairgrove
	<mhairgrove-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Lucien Dunning <ldunning-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Cameron Buschardt
	<cabuschardt-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Arvind Gopalakrishnan
	<arvindg-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Shachar Raindel <raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Liran Liss <liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [RFC PATCH 4/8 v2] IB/odp/hmm: prepare for HMM code path.
Date: Thu, 13 Aug 2015 17:11:21 -0400	[thread overview]
Message-ID: <20150813211121.GA10678@redhat.com> (raw)
In-Reply-To: <20150813201335.GA22581-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On Thu, Aug 13, 2015 at 02:13:35PM -0600, Jason Gunthorpe wrote:
> On Thu, Aug 13, 2015 at 03:20:49PM -0400, Jérôme Glisse wrote:
>   
> > +#if IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM)
> > +#else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM */
> 
> Yuk, what is wrong with
> 
>  #if !IS_ENABLED(...)
> 
> ?

Just that latter patches add code btw #if and #else, and that
originaly it was a bigger patch that added the #if code #else
at the same time. Hence why this patch looks like this.

> 
> > -#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
> > +#if IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING)
> > +#if IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM)
> > +#else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM */
> 
> Double yuk
> 
>  #if !(IS_ENABLED(..) && IS_ENABLED(..))
> 
> ?

Same reason as above.


> And the #ifdefs suck, as many as possible should be normal if
> statements, and one should think carefully if we really need to remove
> fields from structures..

My patch only add #if, i am not responsible for previous code
that used #ifdef, i was told to convert to #if and that's what
i am doing.

Regarding fields, yes this is intentional, ODP is an infrastructure
that is private to infiniband and thus needs more fields inside ib
struct. While HMM is intended to be a common infrastructure not only
for ib device but for other kind of devices too.

Cheers,
Jérôme
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-08-13 21:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 19:20 [RFC PATCH 0/8 v2] Implement ODP using HMM v2 Jérôme Glisse
2015-08-13 19:20 ` [RFC PATCH 1/8 v2] IB/mlx5: add a new parameter to __mlx_ib_populated_pas for ODP with HMM Jérôme Glisse
2015-08-13 19:20 ` [RFC PATCH 2/8 v2] IB/mlx5: add a new parameter to mlx5_ib_update_mtt() " Jérôme Glisse
2015-08-13 19:20 ` [RFC PATCH 4/8 v2] IB/odp/hmm: prepare for HMM code path Jérôme Glisse
     [not found]   ` <1439493653-1191-5-git-send-email-jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-08-13 20:13     ` Jason Gunthorpe
     [not found]       ` <20150813201335.GA22581-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-13 21:11         ` Jerome Glisse [this message]
2015-08-13 19:20 ` [RFC PATCH 5/8 v2] IB/odp/hmm: add core infiniband structure and helper for ODP with HMM v3 Jérôme Glisse
2015-08-13 19:20 ` [RFC PATCH 6/8 v2] IB/mlx5/hmm: add mlx5 HMM device initialization and callback v3 Jérôme Glisse
     [not found] ` <1439493653-1191-1-git-send-email-jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-08-13 19:20   ` [RFC PATCH 3/8 v2] IB/odp: export rbt_ib_umem_for_each_in_range() Jérôme Glisse
2015-08-13 19:20   ` [RFC PATCH 7/8 v2] IB/mlx5/hmm: add page fault support for ODP on HMM v2 Jérôme Glisse
2015-08-13 19:20   ` [RFC PATCH 8/8 v2] IB/mlx5/hmm: enable ODP using " Jérôme Glisse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150813211121.GA10678@redhat.com \
    --to=jglisse-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=SCheung-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=arvindg-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=cabuschardt-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=charle-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=dpoole-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=jhubbard-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=ldunning-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=mhairgrove-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sgutti-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).