From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: Re: [PATCH v1 for-next 06/16] IB/core: Implement support for MMU notifiers regarding on demand paging regions Date: Tue, 14 Oct 2014 01:29:44 -0700 Message-ID: References: <20140904202458.GB2685@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Haggai Eran , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Shachar Raindel , Sagi Grimberg List-Id: linux-rdma@vger.kernel.org > + notifiers_seq = atomic_read(&item->odp_data->notifiers_seq) + 1; > + atomic_set(&item->odp_data->notifiers_seq, > + notifiers_seq); Is this code really as silly as it looks, or is there some deep reason for avoiding atomic_inc() that I'm missing? Do you need atomic_inc(), since as far as I can tell all modification of notifiers_seq and notifiers_count happens while holding the umem_mutex? In general I find it very suspicious that you have these two atomic_t members, notifiers_seq and notifiers_count, but you never use anything except atomic_read() and atomic_set() to access them. Why are they atomic_t at all? - R. -- 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