From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Moni Shoua' <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
leon-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
'Kamal Heib' <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
'Amir Vadai' <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: RE: [PATCH rdma-next 11/29] IB/rxe: Allocation pool for RDMA objects
Date: Wed, 15 Jun 2016 11:17:06 -0500 [thread overview]
Message-ID: <011101d1c721$5c22d590$146880b0$@opengridcomputing.com> (raw)
In-Reply-To: <1464886657-14258-12-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Manage and allocate pool of objects with given limit on number of
> elements. Gets parameters from rxe_type_info. Pool elements are
> allocated out of a slab cache. Objects that are using this facility
> are: PD, QP, SRQ, CQ, MR, FMR, MW, etc.
>
> Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/hw/rxe/rxe_pool.c | 510
> +++++++++++++++++++++++++++++++++++
> drivers/infiniband/hw/rxe/rxe_pool.h | 164 +++++++++++
> 2 files changed, 674 insertions(+)
> create mode 100644 drivers/infiniband/hw/rxe/rxe_pool.c
> create mode 100644 drivers/infiniband/hw/rxe/rxe_pool.h
>
> diff --git a/drivers/infiniband/hw/rxe/rxe_pool.c
> b/drivers/infiniband/hw/rxe/rxe_pool.c
> new file mode 100644
> index 0000000..5a7da6b
> --- /dev/null
> +++ b/drivers/infiniband/hw/rxe/rxe_pool.c
> @@ -0,0 +1,510 @@
> +/*
> + * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
> + * Copyright (c) 2015 System Fabric Works, Inc. All rights reserved.
> + *
> + * This software is available to you under a choice of one of two
> + * licenses. You may choose to be licensed under the terms of the GNU
> + * General Public License (GPL) Version 2, available from the file
> + * COPYING in the main directory of this source tree, or the
> + * OpenIB.org BSD license below:
> + *
> + * Redistribution and use in source and binary forms, with or
> + * without modification, are permitted provided that the following
> + * conditions are met:
> + *
> + * - Redistributions of source code must retain the above
> + * copyright notice, this list of conditions and the following
> + * disclaimer.
> + *
> + * - Redistributions in binary form must reproduce the above
> + * copyright notice, this list of conditions and the following
> + * disclaimer in the documentation and/or other materials
> + * provided with the distribution.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> HOLDERS
> + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> + * SOFTWARE.
> + */
> +
> +#include "rxe.h"
> +#include "rxe_loc.h"
> +
> +/* info about object pools
> + * note that mr, fmr and mw share a single index space
> + * so that one can map an lkey to the correct type of object
> + */
> +struct rxe_type_info rxe_type_info[RXE_NUM_TYPES] = {
> + [RXE_TYPE_UC] = {
> + .name = "uc",
> + .size = sizeof(struct rxe_ucontext),
> + },
> + [RXE_TYPE_PD] = {
> + .name = "pd",
> + .size = sizeof(struct rxe_pd),
> + },
> + [RXE_TYPE_AH] = {
> + .name = "ah",
> + .size = sizeof(struct rxe_ah),
> + .flags = RXE_POOL_ATOMIC,
> + },
> + [RXE_TYPE_SRQ] = {
> + .name = "srq",
> + .size = sizeof(struct rxe_srq),
> + .flags = RXE_POOL_INDEX,
> + .min_index = RXE_MIN_SRQ_INDEX,
> + .max_index = RXE_MAX_SRQ_INDEX,
> + },
> + [RXE_TYPE_QP] = {
> + .name = "qp",
> + .size = sizeof(struct rxe_qp),
> + .cleanup = rxe_qp_cleanup,
> + .flags = RXE_POOL_INDEX,
> + .min_index = RXE_MIN_QP_INDEX,
> + .max_index = RXE_MAX_QP_INDEX,
> + },
> + [RXE_TYPE_CQ] = {
> + .name = "cq",
> + .size = sizeof(struct rxe_cq),
> + .cleanup = rxe_cq_cleanup,
> + },
> + [RXE_TYPE_MR] = {
> + .name = "mr",
> + .size = sizeof(struct rxe_mem),
> + .cleanup = rxe_mem_cleanup,
> + .flags = RXE_POOL_INDEX,
> + .max_index = RXE_MAX_MR_INDEX,
> + .min_index = RXE_MIN_MR_INDEX,
> + },
> + [RXE_TYPE_FMR] = {
> + .name = "fmr",
> + .size = sizeof(struct rxe_mem),
> + .cleanup = rxe_mem_cleanup,
> + .flags = RXE_POOL_INDEX,
> + .max_index = RXE_MAX_FMR_INDEX,
> + .min_index = RXE_MIN_FMR_INDEX,
> + },
> + [RXE_TYPE_MW] = {
> + .name = "mw",
> + .size = sizeof(struct rxe_mem),
> + .flags = RXE_POOL_INDEX,
> + .max_index = RXE_MAX_MW_INDEX,
> + .min_index = RXE_MIN_MW_INDEX,
> + },
> + [RXE_TYPE_MC_GRP] = {
> + .name = "mc_grp",
> + .size = sizeof(struct rxe_mc_grp),
> + .cleanup = rxe_mc_cleanup,
> + .flags = RXE_POOL_KEY,
> + .key_offset = offsetof(struct rxe_mc_grp, mgid),
> + .key_size = sizeof(union ib_gid),
> + },
> + [RXE_TYPE_MC_ELEM] = {
> + .name = "mc_elem",
> + .size = sizeof(struct rxe_mc_elem),
> + .flags = RXE_POOL_ATOMIC,
> + },
> +};
> +
Perhaps the above slab names should be prefixed with "rxe-"? EG: "rxe-cq",
"rxe-qp", etc. They look very non-descriptive when looking at them in slabinfo:
[root@stevo2 linux-2.6]# head /proc/slabinfo
slabinfo - version: 2.1
# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab>
: tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs>
<num_slabs> <sharedavail>
uc 0 0 352 11 1 : tunables 54 27 8 :
slabdata 0 0 0
cq 6 34 240 17 1 : tunables 120 60 8 :
slabdata 2 2 0
qp 4 6 1920 2 1 : tunables 24 12 8 :
slabdata 3 3 0
pd 4 36 112 36 1 : tunables 120 60 8 :
slabdata 1 1 0
Also when using rxe with nvmf (among other bugs I'm chasing down), when you
unload ib_rxe, there are allocated cq objects left in the the slab cache:
kmem_cache_destroy cq: Slab cache still has objects
CPU: 5 PID: 4147 Comm: rmmod Tainted: G E 4.7.0-rc2-nvmf-all.3+rxe+
#51
Hardware name: Supermicro X9DR3-F/X9DR3-F, BIOS 3.2a 07/09/2015
0000000000000000 ffff881007b33d98 ffffffff812d1359 ffff88103bd65098
ffffea00378983d0 ffff881007b33da8 ffff881078b32240 ffff881007b33df8
ffffffff8117619c ffff881007b33da8 ffff881007b33da8 ffff88103bec6960
Call Trace:
[<ffffffff812d1359>] dump_stack+0x51/0x78
[<ffffffff8117619c>] kmem_cache_destroy+0x12c/0x150
[<ffffffffa04c62cc>] rxe_cache_exit+0x1c/0x40 [ib_rxe]
[<ffffffffa04ce4cf>] rxe_module_exit+0x13/0x23 [ib_rxe]
[<ffffffff810e1d15>] SyS_delete_module+0x185/0x1d0
[<ffffffff8100278e>] ? syscall_trace_enter_phase2+0x6e/0x190
[<ffffffff81002915>] ? syscall_trace_enter+0x65/0x70
[<ffffffff81002d4d>] do_syscall_64+0x6d/0x160
[<ffffffff8161857c>] entry_SYSCALL64_slow_path+0x25/0x25
rxe: unloaded
Steve.
--
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
next prev parent reply other threads:[~2016-06-15 16:17 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 16:57 [PATCH rdma-next 00/29] Soft RoCE driver Moni Shoua
[not found] ` <1464886657-14258-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-02 16:57 ` [PATCH rdma-next 01/29] IB/rxe: IBA header types and methods Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 02/29] IB/rxe: Bit mask and lengths declaration for different opcodes Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 03/29] IB/rxe: Default rxe device and port parameters Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 04/29] IB/rxe: External interface to lower level modules Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 05/29] IB/rxe: Misc local interfaces between files Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 06/29] IB/rxe: Add maintainer for rxe driver Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 07/29] IB/rxe: Work request's opcode information table Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 08/29] IB/rxe: User/kernel shared queues infrastructure Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 09/29] IB/rxe: Common user/kernel queue implementation Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 10/29] IB/rxe: Interface to ib_core Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 11/29] IB/rxe: Allocation pool for RDMA objects Moni Shoua
[not found] ` <1464886657-14258-12-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-15 16:17 ` Steve Wise [this message]
2016-06-15 16:45 ` Steve Wise
2016-06-15 16:54 ` Moni Shoua
2016-06-19 15:01 ` Yonatan Cohen
[not found] ` <8806657f-7aaa-03a3-8cb4-d04ad03a4822-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-20 21:18 ` Steve Wise
2016-06-15 16:52 ` Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 12/29] IB/rxe: RXE tasks handling Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 13/29] IB/rxe: Address vector manipulation functions Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 14/29] IB/rxe: Shared Receive Queue (SRQ) " Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 15/29] IB/rxe: Completion Queue (CQ) " Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 16/29] IB/rxe: Queue Pair (QP) handling Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 17/29] IB/rxe: Memory Region (MR) manioulation Moni Shoua
[not found] ` <1464886657-14258-18-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-03 5:24 ` Christoph Hellwig
[not found] ` <20160603052440.GA31196-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-06-05 13:25 ` Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 18/29] IB/rxe: Add multicast infrastructure Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 19/29] IB/rxe: Received packets handling Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 20/29] IB/rxe: Completion handling Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 21/29] IB/rxe: QP request handling Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 22/29] IB/rxe: QP response handling Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 23/29] IB/rxe: Dummy DMA callbacks for RXE device Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 24/29] IB/rxe: Invariant CRC implementation Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 25/29] IB/rxe: Module init hooks Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 26/29] IB/rxe: Interface to netdev stack Moni Shoua
[not found] ` <1464886657-14258-27-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-02 17:31 ` Jason Gunthorpe
[not found] ` <20160602173158.GA17320-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-06-05 9:42 ` Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 27/29] IB/rxe: sysfs interface to RXE Moni Shoua
[not found] ` <1464886657-14258-28-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-03 6:00 ` Bart Van Assche
[not found] ` <47f2db91-1d9a-148b-f57c-1b0a3e62d95b-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-05 9:34 ` Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 28/29] IB/rxe: Shared objects between user and kernel Moni Shoua
[not found] ` <1464886657-14258-29-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-09 6:09 ` Leon Romanovsky
[not found] ` <20160609060931.GM3663-2ukJVAZIZ/Y@public.gmane.org>
2016-06-13 7:22 ` Moni Shoua
2016-06-02 16:57 ` [PATCH rdma-next 29/29] IB/rxe: Add Soft-RoCE to kbuild and makefiles Moni Shoua
2016-06-02 18:05 ` [PATCH rdma-next 00/29] Soft RoCE driver Steve Wise
2016-06-08 17:25 ` Hefty, Sean
2016-06-09 13:17 ` Moni Shoua
[not found] ` <CAG9sBKPa0qQ4uuhoWLfZaXP9E+DnLrkOcU-2yNXbdZFQKppN8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-09 14:45 ` Dennis Dalessandro
[not found] ` <20160609144554.GA14212-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-06-09 15:12 ` Moni Shoua
2016-06-09 19:16 ` Leon Romanovsky
[not found] ` <20160609191608.GA5408-2ukJVAZIZ/Y@public.gmane.org>
2016-06-09 19:47 ` Dennis Dalessandro
[not found] ` <20160609194758.GA9017-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-06-12 9:51 ` Moni Shoua
[not found] ` <CAG9sBKN3+Yf7dUG0ORNFNG=j+AgR1eq5mvPQxx6jZEXEGRpk3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-13 15:08 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373AB0617C2-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-06-14 15:31 ` Moni Shoua
2016-06-03 5:25 ` Christoph Hellwig
[not found] ` <20160603052539.GB31196-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-06-08 8:49 ` Moni Shoua
[not found] ` <CAG9sBKN9HQKhRgXWZ8JJwwUdEBaP9VnGwr790C=q4w0XDxkbtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-08 9:52 ` Nicholas A. Bellinger
[not found] ` <1465379530.5365.91.camel-XoQW25Eq2zviZyQQd+hFbcojREIfoBdhmpATvIKMPHk@public.gmane.org>
2016-06-08 10:41 ` Leon Romanovsky
[not found] ` <20160608104123.GJ3663-2ukJVAZIZ/Y@public.gmane.org>
2016-06-08 12:20 ` Doug Ledford
[not found] ` <5e1bd9ce-f802-9237-14a0-7cdc2be5089b-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-08 13:10 ` Leon Romanovsky
2016-06-08 12:27 ` Sagi Grimberg
[not found] ` <57580F4D.10802-ImC7XgPzLAfvYQKSrp0J2Q@public.gmane.org>
2016-06-08 13:53 ` Steve Wise
2016-06-03 17:04 ` Christoph Lameter
[not found] ` <alpine.DEB.2.20.1606031203510.30612-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-06-05 13:30 ` Moni Shoua
2016-06-08 16:51 ` Steve Wise
2016-06-08 17:40 ` Steve Wise
2016-06-09 7:05 ` Moni Shoua
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='011101d1c721$5c22d590$146880b0$@opengridcomputing.com' \
--to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
--cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=leon-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@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