Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754686AbbDHSla (ORCPT ); Wed, 8 Apr 2015 14:41:30 -0400 Received: from mga11.intel.com ([192.55.52.93]:7887 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754140AbbDHSlZ (ORCPT ); Wed, 8 Apr 2015 14:41:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,545,1422950400"; d="scan'208";a="705668864" From: "Hefty, Sean" To: Doug Ledford , Michael Wang CC: Roland Dreier , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nfs@vger.kernel.org" , "netdev@vger.kernel.org" , Hal Rosenstock , "Tom Tucker" , Steve Wise , Hoang-Nam Nguyen , Christoph Raisch , infinipath , "Eli Cohen" , "Latif, Faisal" , "Upinder Malhi" , Trond Myklebust , "J. Bruce Fields" , "David S. Miller" , "Weiny, Ira" , PJ Waskiewicz , "Nikolova, Tatyana E" , Or Gerlitz , "Jack Morgenstein" , Haggai Eran , Ilya Nelkenbaum , Yann Droneaud , Bart Van Assche , Shachar Raindel , Sagi Grimberg , Devesh Sharma , Matan Barak , Moni Shoua , "Jiri Kosina" , Selvin Xavier , "Mitesh Ahuja" , Li RongQing , Rasmus Villemoes , "Estrin, Alex" , Eric Dumazet , Erez Shitrit , Tom Gundersen , Chuck Lever Subject: RE: [PATCH v2 01/17] IB/Verbs: Implement new callback query_transport() for each HW Thread-Topic: [PATCH v2 01/17] IB/Verbs: Implement new callback query_transport() for each HW Thread-Index: AQHQcTBD5Ho1E72ToEa2d5i/bSEquZ1D5vIA//+MDHA= Date: Wed, 8 Apr 2015 18:41:22 +0000 Message-ID: <1828884A29C6694DAF28B7E6B8A82373A8FBF0E8@ORSMSX109.amr.corp.intel.com> References: <5523CCD5.6030401@profitbricks.com> <5523D098.3020007@profitbricks.com> <1428517786.2980.180.camel@redhat.com> In-Reply-To: <1428517786.2980.180.camel@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t38IfY0n010159 Content-Length: 2296 Lines: 49 > I'm concerned about the performance implications of this. The size of > this patchset already points out just how many places in the code we > have to check for various aspects of the device transport in order to do > the right thing. Without going through the entire list to see how many > are on critical hot paths, I'm sure some of them are on at least > partially critical hot paths (like creation of new connections). I > would prefer to see this change be implemented via a device attribute, > not a functional call query. That adds a needless function call in > these paths. My impression of these changes were that they would eventually lead to the mechanism that you outlined: > I'm also concerned about this. I would like to see this enum > essentially turned into a bitmap. One that is constructed in such a way > that we can always get the specific test we need with only one compare > against the overall value. In order to do so, we need to break it down > into the essential elements that are part of each of the transports. > So, for instance, we can define the two link layers we have so far, plus > reserve one for OPA which we know is coming: > > RDMA_LINK_LAYER_IB = 0x00000001, > RDMA_LINK_LAYER_ETH = 0x00000002, > RDMA_LINK_LAYER_OPA = 0x00000004, > RDMA_LINK_LAYER_MASK = 0x0000000f, > > We can then define the currently known high level transport types: > > RDMA_TRANSPORT_IB = 0x00000010, > RDMA_TRANSPORT_IWARP = 0x00000020, > RDMA_TRANSPORT_USNIC = 0x00000040, > RDMA_TRANSPORT_USNIC_UDP = 0x00000080, > RDMA_TRANSPORT_MASK = 0x000000f0, > > We could then define bits for the IB management types: > > RDMA_MGMT_IB = 0x00000100, > RDMA_MGMT_OPA = 0x00000200, > RDMA_MGMT_MASK = 0x00000f00, > > Then we have space to define specific quirks: > > RDMA_SEPARATE_READ_SGE = 0x00001000, > RDMA_QUIRKS_MASK = 0xfffff000 I too would like to see this as the end result, but I think it's possible to stage the changes by having the static inline calls being added convert to using these sort of attributes. - Sean ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?