summaryrefslogtreecommitdiffstats
path: root/src/svm
AgeCommit message (Collapse)AuthorFilesLines
2020-09-30svm session: use new clib mem apis for segmentsFlorin Coras3-46/+69
"sh memory map" now reports shared memory segments mapped by session layer for applications. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7debdcd06c7728abfb5cf817a1ccc37de495472c
2020-09-29svm: fix max fifo sizeFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I52ac28ed6d420f03852a425b5a16a7eb8e94b628
2020-09-29vcl svm: provide apps access to fifo chunksFlorin Coras2-31/+36
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2191b8594b1e87ecc00f237316457db249f73603
2020-09-28vppinfra: don't call dlmalloc API directly from the codeDamjan Marion9-35/+16
- it is confusing from end consumer perspective that some thing is somewhere called heap and somewhere mspace - this is base for additional work where heap pointer is not the same thing like mspace Type: improvement Change-Id: I644d5a0de17690d65d164d8cec3c5654571629ef Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-09svm: fix non-null-terminated stringBenoît Ganne1-1/+1
Type: fix Change-Id: Ia9cd71ce12584cd8ef90bfe357cf762dd7653f71 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-08svm session: document unsupported fifo deq combinationsFlorin Coras2-2/+8
Type: fix - Document that ooo dequeues with ooo lookups cannot be done in combination with in order dequeues. - Added assert to capture this scenario and de-initialized rbtrees for cut-through tx fifo Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic40d020b3f0391fcf022ea3c906b86121744144f
2020-08-06misc: harmonize namesDave Barach2-9/+9
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ibad744788e200ce012ad88ff59c2c34920742454
2020-04-28svm: fix fifo alignemnt in batch preallocFlorin Coras1-3/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5cdf3cff820a0679f78b212a277d1873c2cfb980
2020-04-28svm: null instead of panic if fifo hdr alloc failsFlorin Coras1-1/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2c5c9e3e7eff8481e48a940e8420d236a16e7649
2020-04-22svm: asan: fix asan supportBenoît Ganne2-0/+11
- restrict the unittests SVM address space to what is supported by ASan - mark SVM mmap()ed address space accessible for ASan - SVM shared memory heap scheme means some allocation can happen outside the current process. Lazily mark those accessible for ASan Type: fix Change-Id: I7c196c80b2a5297651d0afa54f1a8e478fcf59b1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-20svm: check if fifo free list index is valid on allocFlorin Coras2-0/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Benoît Ganne <bganne@cisco.com> Change-Id: Ib85c2f01dc7ec9858f2f88b89e209f989d78c5d9
2020-04-09session: update fifo slice on session migrationFlorin Coras2-14/+79
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic5fb0f95c58ad70925a365004fe911ac8f2d2382
2020-04-09svm: use active fifo count in fifo testFlorin Coras1-12/+8
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id6c9dbf65523274768173e288431d7dbac55676d
2020-04-02misc: fix static analysis warningsDave Barach1-3/+3
One actual bugfix. Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Icef25167f97a70cc795c0a481174de319ed79ad5
2020-03-27vcl: support for uword segmentsFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibfe203fda5a0c88b26eb50bee8a430dd2cfb7dca
2020-03-26svm: correct format_fifo_segmentRyujiro Shibuya1-3/+4
Type: improvement Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Change-Id: Ia8aef3695f12e09b087be79ebe40e758fb8105ad
2020-03-16svm: chunk alloc statsRyujiro Shibuya2-5/+13
Type: feature Showing number of allocated chunks by size, in addition to the freelist chunks by size. Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Change-Id: I50f7b695a217f132d5f0b307182a34752d3fe1dc
2020-03-12svm: cleanup chunk and fifo allocationFlorin Coras1-37/+62
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2426211f48b242e51aeb1edc87c1cd21c526dbfa
2020-03-09svm: track fifo segment virtual memory consumptionFlorin Coras3-38/+69
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I89d33d8e7e7ab049750439b22ba50372fd2261ca
2020-03-05session: reduce segment reserved bytesFlorin Coras1-3/+2
Type: refactor Rb-trees are no longer maintained in the segment so we don't need to reserve memory. Keeping the option as a means to avoid underlying infra (dlmalloc) and alignment overhead. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I84741e95d015f7b72c60d9dca20be8e0aee6a915
2020-03-05session: fix segment search on fifo allocFlorin Coras2-0/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iaa4f9b0ec31a58f7406774f73e1a089bfcf4ac30
2020-02-29svm: add explicit dependency on lock for fifo typesFlorin Coras1-0/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib363d8167102f4b05bec0624494481d572096c9f
2020-02-29svm: fix slice locking on fifo allocFlorin Coras1-5/+15
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1fef115ffc2277ad6e0673b49be137147808891c
2020-02-26svm: fix coverity warningsFlorin Coras1-1/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2d5cb7cccb67a3193ce5a25323e70bc05737e023
2020-02-26tls session: fix unlistenFlorin Coras1-1/+0
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie3bc31fc3df662e087f7931de6c274eb3608a2d8
2020-02-26svm: support multi-chunk fifo chunk allocFlorin Coras1-7/+133
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id601cd241a2d124d3189057edab4299ffde7ee32
2020-02-26svm: remove chunk add functionFlorin Coras4-53/+98
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I606eabbe0f3f387529e77d2483f5d63db7bde88a
2020-02-25svm: minimal initial fifoFlorin Coras3-11/+12
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4ee46a6c3c53c58199c275e20702f7fd11b60d9a
2020-02-25session svm: tracking segment memory usageRyujiro Shibuya3-13/+208
1. segment manager would attempt to balance the usages across the segments, when it allocate fifos 2. the memory presure level is determined per fifo-segment 3. updated unit test 4. updated cli output for segments Type: feature Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Change-Id: I2923f3e0a43dd919196a0cb2cd55e098fde6cf66
2020-02-25svm: refactor fifoFlorin Coras6-881/+782
Type: refactor Switch from a wrapped byte space to a "continuous" one wherein fifo chunks are appended to the fifo as more data is enqueued and chunks are removed as data is dequeued. The fifo is still subject to a maximum size, i.e., maximum number of bytes that can be enqueued, so the max number of chunks associated to the fifo is also constrained. When enqueueing data, which must fit within the available free space, if not enough "supporting" chunk memory is available, the fifo asks the fifo segment for enough chunk memory to ensure that the write can succeed. To avoid allocating large amounts of small chunks due to small writes, if possible, the size of the chunks requested is lower capped by min_alloc. When dequeuing data, all the chunks that have been completely drained, i.e., head moved beyond the chunks’ end bytes, are unlinked from the fifo and returned to the fifo segment. The one exception to this is the last chunk which is never unlinked. Change-Id: I98c1dbd9135fb79650365c7e40c29238b96cd4ee Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-02-25svm: refactor fifo chunk trackingFlorin Coras3-82/+294
Avoid tracking with rbtrees all of the chunks associated to a fifo. Instead, only track chunks when doing out-of-order operations (peek or ooo enqueue). Type: refactor Change-Id: I9f8bd266211746637d98e6a12ffc4b2d6346950a Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-02-11vppinfra: remove the historical mheap memory allocatorDave Barach3-49/+0
The mheap allocator has been turned off for several releases. This commit removes the cmake config parameter, parallel support for dlmalloc and mheap, and the mheap allocator itself. Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I104f88a1f06e47e90e5f7fb3e11cd1ca66467903
2020-02-11svm: numa awareness for ssvm segmentsFlorin Coras2-25/+30
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I999836a7893a89aac5243b111eac35fddd03e2a6
2020-01-31session: fix chunk batch alloc for large fifosFlorin Coras1-6/+8
Type: fix Change-Id: Ibfac65b516f20d25d91f6d0cf86491353811b8be Signed-off-by: Florin Coras <fcoras@cisco.com>
2020-01-08svm: fix eventfd signal write error checkFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I706c8642ca0877430a42cc0ca5bc61a45428fc98
2020-01-03session: fix per slice fifo preallocFlorin Coras1-8/+10
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If6db37af6c2863a80d0787a98026b3b8171dad37
2019-12-30svm: broadcast on raw dequeues and full ringsFlorin Coras3-7/+28
Type: fix Change-Id: I0cac9001290e7ed4e2e318ae62c56e97ec75a3db Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-20svm: fix multichunk alloc with not enough spaceFlorin Coras1-2/+32
Type: fix Change-Id: Ia89c76b0e897fc3a3ebbc8dcba25e8ac9974b7fa Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-20svm: fix sh ssvm size for private segmentsFlorin Coras2-11/+10
Type: fix Change-Id: Id11cb596923541c12d37f1afa00416d73c6ff5e3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-19session: reserve memory for rbtreeFlorin Coras2-4/+44
Type: fix Change-Id: I2b89f6e4c09297e3712d88cd25c80a806d3005aa Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-18svm: decrease svm map verbosityFlorin Coras1-1/+1
Type: fix Change-Id: I833b6c23c376f1e806f94f0780be365c82ad1f88 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-12session svm: support for segments larger than 4GBFlorin Coras4-13/+12
Type: feature Change-Id: I7d3017bbb369261d74f51807a226f2c12f45291c Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-12-12session svm: per thread fifo segment slicesFlorin Coras3-205/+324
Type: refactor Change-Id: I9be652e56cdb48b0aee3253f7ce8d9bed299d824 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2019-12-11session: Add mq debug cliNathan Skrzypczak2-0/+20
Type: feature This add a `show app message queue` cli command that shows mq size per app & thread. Change-Id: I5c6ce024b149fb7a47d899bc514c5a4887429982 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-10api: multiple connections per processDave Barach1-1/+1
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-11-27misc: add address sanitizer heap instrumentationBenoît Ganne2-0/+8
Introduce AddressSanitizer support: https://github.com/google/sanitizers/ This starts with heap instrumentation. vlib_buffer, bihash and stack instrumentation should follow. Type: feature Change-Id: I7f20e235b2f79db72efd0e756f22c75f717a9884 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-11-12svm: improve fifo segment verbose cliFlorin Coras2-9/+37
Type: feature Also make sure that size for dlmalloc allocated private segments is accurate. Change-Id: I6ec81ff99a13dd29b9664d768835a68019f0c96c Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-11-07svm: fix byte accounting when allocating fifo headerFlorin Coras1-0/+1
Type: fix Change-Id: Ie50625271d257da814445ce13c2e6cd98986d523 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-10-16svm: immediate fifo growth even when wrappedRyujiro Shibuya2-8/+117
Type: fix - when the fifo is wrapped, and if applicable, insert a new chunk after the tail-chunk and rebuild the rb_tree. - make sure that this new algorithm can be applied only when the fifo is used by a single thread (master-thread of the fifo). Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Change-Id: I3fc187bc496ea537ca24381e4abc08d2906c9e03
2019-09-20session: fix msg freeing on errorNathan Skrzypczak1-5/+0
Type: fix Change-Id: I0807f84737d5e98e69e9ed27a1de6813b2ddd138 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>