Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752605AbcCAInF (ORCPT ); Tue, 1 Mar 2016 03:43:05 -0500 Received: from mail-db3on0067.outbound.protection.outlook.com ([157.55.234.67]:47379 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751965AbcCAInA (ORCPT ); Tue, 1 Mar 2016 03:43:00 -0500 Authentication-Results: spf=pass (sender IP is 193.47.165.134) smtp.mailfrom=mellanox.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=mellanox.com; Subject: Re: [PATCHv7 1/3] rdmacg: Added rdma cgroup controller To: Parav Pandit , , , , , , , , , , , References: <1456668821-25799-1-git-send-email-pandit.parav@gmail.com> <1456668821-25799-2-git-send-email-pandit.parav@gmail.com> CC: , , , , , , , From: Haggai Eran Message-ID: <56D5524D.1060905@mellanox.com> Date: Tue, 1 Mar 2016 10:26:53 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1456668821-25799-2-git-send-email-pandit.parav@gmail.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.0.52.254] X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CPI:193.47.165.134;IPV:NLI;CTRY:IL;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(189002)(199003)(479174004)(24454002)(2201001)(189998001)(1096002)(87936001)(4326007)(106466001)(5004730100002)(2906002)(64126003)(11100500001)(5001960100003)(81156008)(5008740100001)(50466002)(586003)(86362001)(83506001)(77096005)(65806001)(230700001)(2950100001)(4001350100001)(6116002)(33656002)(6806005)(92566002)(87266999)(50986999)(76176999)(54356999)(3846002)(23746002)(19580405001)(36756003)(19580395003)(5001770100001)(47776003)(65816999)(1220700001)(921003)(3940600001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB1792;H:mtlcas13.mtl.com;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;AM1FFO11FD002;1:Y4p5PXoyR6HnEEDURlJcTUujLaHu5hxqZOpgo2EjRPA6KqV9cN4z9j322zSzim8pgHibZzXAOmy5OPszjvx6nFCDOrnxxvMPL0f9OVM1IeWnsf3OoU361Mv3t0tnJXHta6L1HVS5UkhB6+r62psuVALTukGeKUFuE8aS7XYrDpJqJwXhLlqtpF2nXAZyqRzmiu7FxFspkd7XktvA+CVVcrrulxpTGmOsmrHfRj46SaZ1posFiO0UhefZTIzbXzsZYk8aFxLzOheuun4/jwLd+hjoS005RaaiqjIJANYf5Z0EysOwTZg4vyKlxjApUVR5e6T4uQ6UQEWlL1Wo1SQMDWt/sw824fq+YpciRLux0uEdcHjgWYC8f4bUj5ArXWpWQJAp/W6Uql3hUnLmEIZq3lFCR4fE75POwLP+j5KftfS67aaYgbDt7SQD/tldIlHdcdJVg4wxudEs9mtNh5mOj7SNp8SqG7lNfa7XaOQVR4na8u8nge+UGCJBxqjzRTv4 X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1792;2:VscregT825Fj8dt7DVcAhJodaf/bGK5EksLGNBN9FpLbJaZ3YyXzYYUzB1goFQMuSk9O4GWdBwjz8FQhdoB+y67y4RBbM4degXMZn20vY5VjxalbnLBD9BL2COPLtbygNDC3VnELws/itmsHAlkKiQ==;3:IZtbXtOfcDugclXHVzLtXMaNg4R95xhDw4RUqgoRJCbhVZhdGqtmjBFvFVr7rwcxnSRbjgLjeRtEBgjMfM7xJm8nWB71e9+O4bLdl/D3v+bHAfRtStfqiQEk+wh7ta24RwR4LSMaRpeju4SfJtu7pPNrhq1VxfAReAZpLZC0fctn+gQKOHeaK/VYgx7vo0uMX3cNj0RO9F09F5HlEhBA9w==;25:1qsvlnOYjz5zYgJceDdSEWh3ZAY5CT4yOTweT3Rm3gkIMITsZAmbRhXAZrjHDk0zpwmaMvnvcVjCI8VP1wrOnxEMGsxlA1skmE32jEAlv7LP2h+wwylqS9LMKvvGpahEUvXz2L3aIMkn5d/jkprBC2XUE0S1Dik8wp42vlkBHNu24JD/LQpAfUGmtQxOSKPI9uhIdrhaN04274vSDIp6zgAr3RROSW/2cMgNwYs4Z69tGTCkZobuCwJ1BPup2eYftKVVhVczkamBjiqu7JN/2dYbTM2VxbGqqIZzdcmSIehYdS4CnPpXS3j431VvVIQN2hVOdm4V+TfZUiSy+44qSg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501001);SRVR:VI1PR05MB1792; X-MS-Office365-Filtering-Correlation-Id: 6115e1fc-6e91-481b-543c-08d341ab5b08 X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1792;20:EqDm5WxWJt/2TYEKEXq4Cm/EUyQiKGqDUMEZEiQpAc5I1vvkHBrCTnltPaK15+sq6CR7AcHzgW5kwRJh9pWsEL5psIYW51NmU+bGT01s/QqhlieIbrJVjnJ26pf7bbXQ4yvPXzhWxiMkO+bQHJGDwjnIl+Dzuozu5vevfJPlbk3T97q+TR5lstYXlfz9pPiH2SzoXVzqLKrj2U4iAg9/OMxNaeJdVRGfWBFmKVdD28xeDAyicT3rgbn5gCOXyM/vr2W1Kf0ogpFPDw4uv7/mOGK4M3a3B3E1RhvnwXI0x5MriG3wD4pAr0DJNGojQnal4Vg7edmnqjB6LwlvTzaT7hdEfAsUn6R4BlMtvnmALfr1f8GoWhG3j+IYTew3p7iAtLbA+5GhcpVtbRmTvqU1x2O9E0g8BGhpTZNwfEkjMt8begHtfOFRfGnajGBieWP1MhOJyaF/wTcUF/faKQ6yHVydk//0LtJDhA0YSHDD8FGVW3mbnswCMxyauZ5JoShV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13018025)(13015025)(13023025)(8121501046)(13017025)(13024025)(5005006)(10201501046)(3002001);SRVR:VI1PR05MB1792;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1792; X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1792;4:temjxWmFsUTQk4a4kkxI2t+ECIVl2Si86LsXf8K8yKnu3ADBRxhZ1Y7YxPZf4LIoGU2lMggIRN7P1Q41PvFouLkSnsDrJpUwWfdQic6tVkCwj6prMXaF7mGS+VecI/J2LCwsEXwwBy6bfyQU2Qp7w5yECg/Vh7++NME5ML9x4RADftnYUtblA9sIETjJSPSn7yMzCeG7JQj1Ptc346ElxUcqHjnJ02vSkmDM9QkuPBkH0xhg6n9RA0FgYj3086D7m/Nw6NVBeOFJyMnVhTT5D7o1tw6ztwhPtMKoXEXWrZFhwaS/+4h96vsJog0zLq57jv0LV0H+R4gdIzH5FKQELE3/p+Uca16dzlOUGUwz/rhV3PJgaCVZH5LNOvU5FKtVHOMiiVV0obhIJkoqQzLVZQEgdkeRmooJ9EI22a2mDvOOTK22TRi5isnnL3osSHWXTLYPfz6FRgxq05uH6iTWzA== X-Forefront-PRVS: 086831DFB4 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;VI1PR05MB1792;23:j0KE66de69rcGJBiF5xGpxgdnNeskNFBb5KzD?= =?Windows-1252?Q?cmmdzjUGK+PJjXoBgYBXX6W9CDaGyFeR7tuK5/T22guxb5IVM8BtWU5K?= =?Windows-1252?Q?CvpHl05wZbNB4pa8iHr564Ieht+BurZonH1YBNWucCr0Q4jy9XSJbxTE?= =?Windows-1252?Q?w5LTOXiKEjkwjrByYSSiV40KcuYe4GgidKvMmYkFt6jNmdMXQZzazsau?= =?Windows-1252?Q?OG4y367PJimCReQHxffy26Jt8y25OwEGtufWp38dI3ba8z/GMFKixkiV?= =?Windows-1252?Q?OoHUhnUjqYuhJCGzZxWZqoO3bMyjpOVt8AZr6pOxMeAQS+BDi+xKyEq0?= =?Windows-1252?Q?HzDeL3bjEeF/T3oLjAG9zfQkKblAQhw9vhlTXVF8S5wFqqYpkNJeUghe?= =?Windows-1252?Q?JheqlUgZ7Qp6fSR6lYux3YcrQDW/W1bDjiIJi3sF0KQlINRH7iY3OtZQ?= =?Windows-1252?Q?vT3H0B1otGcZflpKp5/RT6KE3/J85yIEAlMIaD2VIFkMlf5ermNTNy0W?= =?Windows-1252?Q?vXIr7i6+8PRu8xsPjYJbnHVA5SPY6VxmwJ5O6oIXHrjYCigMgZPQhHG2?= =?Windows-1252?Q?BBfJC99KBiAtTDWhdiRfWym5cFm4AbrVVxDm09THp4F/saBxh24SS2KZ?= =?Windows-1252?Q?OsWJmyogd6PrhTYVC6atK7Toauef16uCmIofYUlMJdSNnGWwFD8JSHGT?= =?Windows-1252?Q?Ewp6wndL6ohCgSvEZxGmJ+o1DcXmTcvYeM2SypSDNiyXS+kOKYjPiMUK?= =?Windows-1252?Q?cMzaQygvpI6nzdagGdLuIFahWT7jhtOt0ayCDgz8vkGQOpY7qa8sqWs7?= =?Windows-1252?Q?yZlXzMIlDfiJtBquVsRwSx/RlAnZtHC0NT0DxdwOiLvyz0i0HQwCDRS/?= =?Windows-1252?Q?3l4c/QpAp88puXQu0f9blHyWKqYw45W3s4c1F9gPhQ1mzfc50C8CaqPp?= =?Windows-1252?Q?+VM3SeOzbY/L/h3SJGFPS9SqerN/BOvu3ZXChhvgcckVye0gQ8cQ57vA?= =?Windows-1252?Q?FphqmGnE5nA0y4bSwLKB6r2beBjsBcALI2DXzE2s89hTZ0UPDGGsn0WV?= =?Windows-1252?Q?zQ9NUMcW1wuyiVj2PDj//EpB31unMQNM4otUjbDdXfoYe5xC25b7MS2I?= =?Windows-1252?Q?smlzza7KARjQfeXw4MQ25Pcov2bSHXsuTrTzwQC7RX+oRamApcdV7BPZ?= =?Windows-1252?Q?IzvTJw75pAL6kalpd0u5Vi7+CYBNkqoXyWV9sI09uEN8lpmvoujLqR0w?= =?Windows-1252?Q?FcF/uRADaKFmvV+RapNa269Rfn/mm3TfOdb/Bq9+ciu2hrdfHtCIjWvQ?= =?Windows-1252?Q?uCI5Sg3lKRUYULXztsejvFnyjgnbC+2i5OhNsZMRhHwvR8=3D?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1792;5:GtvCHiT9FMAm8JqW6a/DHTymuiZVrk/HP1tS14PFqv1C2BXj1l0hoIXoPitcsDSKRIK2JcrOd/+qQniw7FDMHwcR8g1Ya8Y+I0ntzpRZx/qWPhBD2+CTqd4JLbjFmfL2oZcgz/MgRObaU0/bDjs5lA==;24:8ONa0l79WxtS6+phktFL9eRHI1jASQG+3hCU0pB2V1+bfu9Db7sOcwKsL3d8XQYISBHN7fJd13MBWjy9zf6Erb4KGABedbgQDcX/w318/hU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2016 08:27:41.0141 (UTC) X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a652971c-7d2e-4d9b-a6a4-d149256f461b;Ip=[193.47.165.134];Helo=[mtlcas13.mtl.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1792 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1279 Lines: 29 On 28/02/2016 16:13, Parav Pandit wrote: > Added rdma cgroup controller that does accounting, limit enforcement > on rdma/IB verbs and hw resources. > > Added rdma cgroup header file which defines its APIs to perform > charing/uncharing functionality and device registration which will > participate in controller functions of accounting and limit > enforcements. It also define rdmacg_device structure to bind IB stack > and RDMA cgroup controller. > > RDMA resources are tracked using resource pool. Resource pool is per > device, per cgroup entity which allows setting up accounting limits > on per device basis. > > Resources are not defined by the RDMA cgroup, instead they are defined > by the external module IB stack. This allows extending IB stack > without changing kernel, as IB stack is going through changes > and enhancements. > > Resource pool is created/destroyed dynamically whenever > charging/uncharging occurs respectively and whenever user > configuration is done. Its a tradeoff of memory vs little more code > space that creates resource pool whenever necessary, > instead of creating them during cgroup creation and device registration > time. > > Signed-off-by: Parav Pandit Reviewed-by: Haggai Eran