2009-02-24 15:30:32 +00:00
|
|
|
|
2018-07-23 20:51:23 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2016-06-13 09:44:26 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
net/rds: Optimize rds_ib_laddr_check
rds_ib_laddr_check() creates a CM_ID and attempts to bind the address
in question to it. This in order to qualify the allegedly local
address as a usable IB/RoCE address.
In the field, ExaWatcher runs rds-ping to all ports in the fabric from
all local ports. This using all active ToS'es. In a full rack system,
we have 14 cell servers and eight db servers. Typically, 6 ToS'es are
used. This implies 528 rds-ping invocations per ExaWatcher's "RDSinfo"
interval.
Adding to this, each rds-ping invocation creates eight sockets and
binds the local address to them:
socket(AF_RDS, SOCK_SEQPACKET, 0) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
socket(AF_RDS, SOCK_SEQPACKET, 0) = 4
bind(4, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
socket(AF_RDS, SOCK_SEQPACKET, 0) = 5
bind(5, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
socket(AF_RDS, SOCK_SEQPACKET, 0) = 6
bind(6, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
socket(AF_RDS, SOCK_SEQPACKET, 0) = 7
bind(7, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
socket(AF_RDS, SOCK_SEQPACKET, 0) = 8
bind(8, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
socket(AF_RDS, SOCK_SEQPACKET, 0) = 9
bind(9, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
socket(AF_RDS, SOCK_SEQPACKET, 0) = 10
bind(10, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("192.168.36.2")}, 16) = 0
So, at every interval ExaWatcher executes rds-ping's, 4224 CM_IDs are
allocated, considering this full-rack system. After the a CM_ID has
been allocated, rdma_bind_addr() is called, with the port number being
zero. This implies that the CMA will attempt to search for an un-used
ephemeral port. Simplified, the algorithm is to start at a random
position in the available port space, and then if needed, iterate
until an un-used port is found.
The book-keeping of used ports uses the idr system, which again uses
slab to allocate new struct idr_layer's. The size is 2092 bytes and
slab tries to reduce the wasted space. Hence, it chooses an order:3
allocation, for which 15 idr_layer structs will fit and only 1388
bytes are wasted per the 32KiB order:3 chunk.
Although this order:3 allocation seems like a good space/speed
trade-off, it does not resonate well with how it used by the CMA. The
combination of the randomized starting point in the port space (which
has close to zero spatial locality) and the close proximity in time of
the 4224 invocations of the rds-ping's, creates a memory hog for
order:3 allocations.
These costly allocations may need reclaims and/or compaction. At
worst, they may fail and produce a stack trace such as (from uek4):
[<ffffffff811a72d5>] __inc_zone_page_state+0x35/0x40
[<ffffffff811c2e97>] page_add_file_rmap+0x57/0x60
[<ffffffffa37ca1df>] remove_migration_pte+0x3f/0x3c0 [ksplice_6cn872bt_vmlinux_new]
[<ffffffff811c3de8>] rmap_walk+0xd8/0x340
[<ffffffff811e8860>] remove_migration_ptes+0x40/0x50
[<ffffffff811ea83c>] migrate_pages+0x3ec/0x890
[<ffffffff811afa0d>] compact_zone+0x32d/0x9a0
[<ffffffff811b00ed>] compact_zone_order+0x6d/0x90
[<ffffffff811b03b2>] try_to_compact_pages+0x102/0x270
[<ffffffff81190e56>] __alloc_pages_direct_compact+0x46/0x100
[<ffffffff8119165b>] __alloc_pages_nodemask+0x74b/0xaa0
[<ffffffff811d8411>] alloc_pages_current+0x91/0x110
[<ffffffff811e3b0b>] new_slab+0x38b/0x480
[<ffffffffa41323c7>] __slab_alloc+0x3b7/0x4a0 [ksplice_s0dk66a8_vmlinux_new]
[<ffffffff811e42ab>] kmem_cache_alloc+0x1fb/0x250
[<ffffffff8131fdd6>] idr_layer_alloc+0x36/0x90
[<ffffffff8132029c>] idr_get_empty_slot+0x28c/0x3d0
[<ffffffff813204ad>] idr_alloc+0x4d/0xf0
[<ffffffffa051727d>] cma_alloc_port+0x4d/0xa0 [rdma_cm]
[<ffffffffa0517cbe>] rdma_bind_addr+0x2ae/0x5b0 [rdma_cm]
[<ffffffffa09d8083>] rds_ib_laddr_check+0x83/0x2c0 [ksplice_6l2xst5i_rds_rdma_new]
[<ffffffffa05f892b>] rds_trans_get_preferred+0x5b/0xa0 [rds]
[<ffffffffa05f09f2>] rds_bind+0x212/0x280 [rds]
[<ffffffff815b4016>] SYSC_bind+0xe6/0x120
[<ffffffff815b4d3e>] SyS_bind+0xe/0x10
[<ffffffff816b031a>] system_call_fastpath+0x18/0xd4
To avoid these excessive calls to rdma_bind_addr(), we optimize
rds_ib_laddr_check() by simply checking if the address in question has
been used before. The rds_rdma module keeps track of addresses
associated with IB devices, and the function rds_ib_get_device() is
used to determine if the address already has been qualified as a valid
local address. If not found, we call the legacy rds_ib_laddr_check(),
now renamed to rds_ib_laddr_check_cm().
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Signed-off-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20260408080420.540032-2-achender@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-08 01:04:19 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-15 12:34:33 -07:00
|
|
|
|
|
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2017-07-04 15:53:15 +03:00
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-15 12:34:33 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-23 11:04:21 -07:00
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-22 21:59:15 -04:00
|
|
|
|
2012-02-03 11:09:23 -05:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2018-07-23 20:51:21 -07:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-23 20:51:21 -07:00
|
|
|
|
2015-08-22 15:45:25 -07:00
|
|
|
|
2018-07-23 20:51:21 -07:00
|
|
|
|
2015-08-22 15:45:25 -07:00
|
|
|
|
|
|
|
|
|
2018-07-23 20:51:21 -07:00
|
|
|
|
2010-05-18 15:48:51 -07:00
|
|
|
|
2018-07-23 20:51:21 -07:00
|
|
|
|
2010-05-18 15:48:51 -07:00
|
|
|
|
2015-08-22 15:45:25 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2015-08-22 15:45:25 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2009-04-01 08:20:19 +00:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-18 13:44:14 +00:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2010-09-18 13:44:14 +00:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2009-04-01 08:20:19 +00:00
|
|
|
|
2017-07-04 15:53:15 +03:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2009-04-01 08:20:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-18 15:48:51 -07:00
|
|
|
|
2009-04-01 08:20:19 +00:00
|
|
|
|
|
|
|
|
|
2010-06-25 14:58:16 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-25 14:58:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2009-10-30 08:51:55 +00:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-10 21:20:57 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2015-09-10 21:20:57 -07:00
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2018-07-30 22:48:42 -07:00
|
|
|
|
2018-07-23 20:51:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2018-07-23 20:51:23 -07:00
|
|
|
|
2018-07-30 22:48:42 -07:00
|
|
|
|
2018-07-23 20:51:23 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
2016-03-01 15:20:51 -08:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2016-03-01 15:20:51 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-22 15:45:31 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-15 18:20:35 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2015-08-25 12:02:00 -07:00
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
2015-08-25 12:02:00 -07:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2015-08-25 12:02:00 -07:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2015-08-25 12:02:00 -07:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2016-03-01 15:20:48 -08:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2015-08-25 12:02:00 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2015-09-10 21:20:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
2015-09-10 21:20:57 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
2015-08-25 12:02:00 -07:00
|
|
|
|
|
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
net: rds: fix memory leak in rds_ib_flush_mr_pool
When the following tests last for several hours, the problem will occur.
Server:
rds-stress -r 1.1.1.16 -D 1M
Client:
rds-stress -r 1.1.1.14 -s 1.1.1.16 -D 1M -T 30
The following will occur.
"
Starting up....
tsks tx/s rx/s tx+rx K/s mbi K/s mbo K/s tx us/c rtt us cpu
%
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
"
>From vmcore, we can find that clean_list is NULL.
>From the source code, rds_mr_flushd calls rds_ib_mr_pool_flush_worker.
Then rds_ib_mr_pool_flush_worker calls
"
rds_ib_flush_mr_pool(pool, 0, NULL);
"
Then in function
"
int rds_ib_flush_mr_pool(struct rds_ib_mr_pool *pool,
int free_all, struct rds_ib_mr **ibmr_ret)
"
ibmr_ret is NULL.
In the source code,
"
...
list_to_llist_nodes(pool, &unmap_list, &clean_nodes, &clean_tail);
if (ibmr_ret)
*ibmr_ret = llist_entry(clean_nodes, struct rds_ib_mr, llnode);
/* more than one entry in llist nodes */
if (clean_nodes->next)
llist_add_batch(clean_nodes->next, clean_tail, &pool->clean_list);
...
"
When ibmr_ret is NULL, llist_entry is not executed. clean_nodes->next
instead of clean_nodes is added in clean_list.
So clean_nodes is discarded. It can not be used again.
The workqueue is executed periodically. So more and more clean_nodes are
discarded. Finally the clean_list is NULL.
Then this problem will occur.
Fixes: 1bc144b62524 ("net, rds, Replace xlist in net/rds/xlist.h with llist")
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-06 04:00:03 -04:00
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
net: rds: fix memory leak in rds_ib_flush_mr_pool
When the following tests last for several hours, the problem will occur.
Server:
rds-stress -r 1.1.1.16 -D 1M
Client:
rds-stress -r 1.1.1.14 -s 1.1.1.16 -D 1M -T 30
The following will occur.
"
Starting up....
tsks tx/s rx/s tx+rx K/s mbi K/s mbo K/s tx us/c rtt us cpu
%
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
"
>From vmcore, we can find that clean_list is NULL.
>From the source code, rds_mr_flushd calls rds_ib_mr_pool_flush_worker.
Then rds_ib_mr_pool_flush_worker calls
"
rds_ib_flush_mr_pool(pool, 0, NULL);
"
Then in function
"
int rds_ib_flush_mr_pool(struct rds_ib_mr_pool *pool,
int free_all, struct rds_ib_mr **ibmr_ret)
"
ibmr_ret is NULL.
In the source code,
"
...
list_to_llist_nodes(pool, &unmap_list, &clean_nodes, &clean_tail);
if (ibmr_ret)
*ibmr_ret = llist_entry(clean_nodes, struct rds_ib_mr, llnode);
/* more than one entry in llist nodes */
if (clean_nodes->next)
llist_add_batch(clean_nodes->next, clean_tail, &pool->clean_list);
...
"
When ibmr_ret is NULL, llist_entry is not executed. clean_nodes->next
instead of clean_nodes is added in clean_list.
So clean_nodes is discarded. It can not be used again.
The workqueue is executed periodically. So more and more clean_nodes are
discarded. Finally the clean_list is NULL.
Then this problem will occur.
Fixes: 1bc144b62524 ("net, rds, Replace xlist in net/rds/xlist.h with llist")
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-06 04:00:03 -04:00
|
|
|
|
|
|
|
|
|
2011-08-30 15:21:30 +00:00
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
|
|
|
|
|
net: rds: fix memory leak in rds_ib_flush_mr_pool
When the following tests last for several hours, the problem will occur.
Server:
rds-stress -r 1.1.1.16 -D 1M
Client:
rds-stress -r 1.1.1.14 -s 1.1.1.16 -D 1M -T 30
The following will occur.
"
Starting up....
tsks tx/s rx/s tx+rx K/s mbi K/s mbo K/s tx us/c rtt us cpu
%
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
1 0 0 0.00 0.00 0.00 0.00 0.00 -1.00
"
>From vmcore, we can find that clean_list is NULL.
>From the source code, rds_mr_flushd calls rds_ib_mr_pool_flush_worker.
Then rds_ib_mr_pool_flush_worker calls
"
rds_ib_flush_mr_pool(pool, 0, NULL);
"
Then in function
"
int rds_ib_flush_mr_pool(struct rds_ib_mr_pool *pool,
int free_all, struct rds_ib_mr **ibmr_ret)
"
ibmr_ret is NULL.
In the source code,
"
...
list_to_llist_nodes(pool, &unmap_list, &clean_nodes, &clean_tail);
if (ibmr_ret)
*ibmr_ret = llist_entry(clean_nodes, struct rds_ib_mr, llnode);
/* more than one entry in llist nodes */
if (clean_nodes->next)
llist_add_batch(clean_nodes->next, clean_tail, &pool->clean_list);
...
"
When ibmr_ret is NULL, llist_entry is not executed. clean_nodes->next
instead of clean_nodes is added in clean_list.
So clean_nodes is discarded. It can not be used again.
The workqueue is executed periodically. So more and more clean_nodes are
discarded. Finally the clean_list is NULL.
Then this problem will occur.
Fixes: 1bc144b62524 ("net, rds, Replace xlist in net/rds/xlist.h with llist")
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-06 04:00:03 -04:00
|
|
|
|
|
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2015-08-25 12:02:00 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-16 15:29:07 -07:00
|
|
|
|
2016-03-01 15:20:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-16 15:29:07 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-11 11:26:02 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-15 18:20:35 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-29 16:55:45 -08:00
|
|
|
|
2015-08-25 12:02:02 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2015-08-25 12:02:01 -07:00
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
2015-08-25 12:02:01 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2010-05-18 15:48:51 -07:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-15 12:34:33 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2015-09-10 21:20:57 -07:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2015-09-10 21:20:57 -07:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2010-07-15 12:34:33 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2018-07-24 20:31:58 -07:00
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 20:31:58 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2018-07-23 20:51:21 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:40 +02:00
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-31 00:32:38 +08:00
|
|
|
|
2018-07-24 20:31:58 -07:00
|
|
|
|
2026-03-31 00:32:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 20:31:58 -07:00
|
|
|
|
2015-09-10 21:20:57 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2018-07-24 20:31:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
|
|
|
|
|
2010-05-18 15:48:51 -07:00
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:48 -08:00
|
|
|
|
2018-07-24 20:31:58 -07:00
|
|
|
|
2009-02-24 15:30:32 +00:00
|
|
|
|
2010-06-11 11:17:59 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-16 15:28:57 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2017-10-04 12:11:29 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2017-10-04 12:11:29 -07:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
2020-05-28 16:45:45 -03:00
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-09-18 16:24:27 +02:00
|
|
|
|
|
|
|
|
|
2016-03-01 15:20:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 14:43:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|