History log of /unit/src/nxt_port_memory.c (Results 1 – 25 of 50)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2126:8542c8141a13 07-Jun-2022 Max Romanov

Removing unused tracking fields and functions.

The message tracking is unused since 1d84b9e4b459 commit.

This fixes the issue found by Coverity (CID 376263).


Revision tags: 1.27.0-1, 1.27.0, 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0
# 1977:3891f1d68cc3 27-Oct-2021 Valentin Bartenev

Fixed memleaks if PID checks fail in nxt_port_incoming_port_mmap().

Memory allocated for "mem" and "mmap_handler" leaked in that case.
Also removed one dead assigment of "hdr" pointer.


# 1976:3997c4645142 26-Oct-2021 Valentin Bartenev

Fixed a potential descriptor leak if mmap() failed.


Revision tags: 1.25.0-1, 1.25.0, 1.24.0-1, 1.24.0, 1.23.0-1, 1.23.0
# 1811:cac57293c5c5 02-Mar-2021 Max Romanov

Closing app outgoing shared memory file descriptor.

This fixes file descriptor leakage in router. Shared memory file used to
send data from router to application. These files are shared among all

Closing app outgoing shared memory file descriptor.

This fixes file descriptor leakage in router. Shared memory file used to
send data from router to application. These files are shared among all
processes of same application and router keeps the opened file descriptor since
06017e6e3a5f commit.

show more ...


Revision tags: 1.22.0-1, 1.22.0, 1.21.0-1, 1.21.0
# 1662:1472957bc7bd 27-Oct-2020 Max Romanov

Router: broadcasting the SHM_ACK message to all process ports.


Revision tags: 1.20.0-1, 1.20.0, 1.19.0-1, 1.19.0
# 1546:06017e6e3a5f 11-Aug-2020 Max Romanov

Changing router to application shared memory exchange protocol.

The application process needs to request the shared memory segment from the
router instead of the latter pushing the segment before se

Changing router to application shared memory exchange protocol.

The application process needs to request the shared memory segment from the
router instead of the latter pushing the segment before sending a request to
the application. This is required to simplify the communication between the
router and the application and to prepare the router for using the application
shared port and then the queue.

show more ...


# 1526:5c2a0b6f92e7 25-Jul-2020 Max Romanov

Using plain shared memory for configuration pass.

There is no restrictions on configration size and using segmented shared memory
only doubles memory usage because to parse configration on router si

Using plain shared memory for configuration pass.

There is no restrictions on configration size and using segmented shared memory
only doubles memory usage because to parse configration on router side,
it needs to be 'plain' e. g. located in single continous memory buffer.

show more ...


Revision tags: 1.18.0-1, 1.18.0
# 1488:6976d36be926 09-Mar-2020 Tiago Natel de Moura

Refactor of process management.

The process abstraction has changed to:

setup(task, process)
start(task, process_data)
prefork(task, process, mp)

The prefork() occurs in the main process rig

Refactor of process management.

The process abstraction has changed to:

setup(task, process)
start(task, process_data)
prefork(task, process, mp)

The prefork() occurs in the main process right before fork.

The file src/nxt_main_process.c is completely free of process
specific logic.

The creation of a process now supports a PROCESS_CREATED state. The
The setup() function of each process can set its state to either
created or ready. If created, a MSG_PROCESS_CREATED is sent to main
process, where external setup can be done (required for rootfs under
container).

The core processes (discovery, controller and router) doesn't need
external setup, then they all proceeds to their start() function
straight away.

In the case of applications, the load of the module happens at the
process setup() time and The module's init() function has changed
to be the start() of the process.

The module API has changed to:

setup(task, process, conf)
start(task, data)

As a direct benefit of the PROCESS_CREATED message, the clone(2) of
processes using pid namespaces now doesn't need to create a pipe
to make the child block until parent setup uid/gid mappings nor it
needs to receive the child pid.

show more ...


Revision tags: 1.17.0-1, 1.17.0
# 1455:1010e9d7d82b 14-Apr-2020 Max Romanov

Completing chained shared memory buffers.

After 41331471eee7 completion handlers should complete next buffer in chain.
Otherwise buffer memory may leak.

Thanks to Peter Tkatchenko for reporing the

Completing chained shared memory buffers.

After 41331471eee7 completion handlers should complete next buffer in chain.
Otherwise buffer memory may leak.

Thanks to Peter Tkatchenko for reporing the issue and testing fixes.

show more ...


Revision tags: 1.16.0-1, 1.16.0, 1.15.0-1, 1.15.0, 1.14.0-1, 1.14.0
# 1321:2c7f79bf0a1f 24-Dec-2019 Max Romanov

Introducing port messages to notify about out of shared memory.

- OOSM (out of shared memory). Sent by application process to router
when application reaches the limit of allocated shared memory

Introducing port messages to notify about out of shared memory.

- OOSM (out of shared memory). Sent by application process to router
when application reaches the limit of allocated shared memory and
needs more.
- SHM_ACK. Sent by router to application when the application's shared
memory is released and the OOSM flag is enabled for the segment.

This implements blocking mode (the library waits for SHM_ACK in case of
out of shared memory condition and retries allocating the required memory
amount) and non-blocking mode (the library notifies the application that
it's out of shared memory and returns control to the application module
that sets up the output queue and puts SHM_ACK in the main message loop).

show more ...


Revision tags: 1.13.0-1, 1.13.0, 1.12.0-1, 1.12.0, 1.11.0-2, 1.11.0-1, 1.11.0, 1.10.0-2, 1.10.0-1, 1.10.0
# 1125:f92f3cd41257 15-Aug-2019 Max Romanov

Fixing multi-thread port write racing conditions.


Revision tags: 1.9.0-1, 1.9.0
# 1008:84f2370bd642 11-Mar-2019 Andrey Zelenkov

Style.


Revision tags: 1.8.0-1, 1.8.0, 1.7.1-1, 1.7.1, 1.7-1, 1.7, 1.6-1, 1.6, 1.5-1, 1.5, 1.4-2, 1.4
# 743:e0f0cd7d244a 06-Aug-2018 Max Romanov

Unit application library.

Library now used in all language modules.
Old 'nxt_app_*' code removed.

See src/test/nxt_unit_app_test.c for usage sample.


Revision tags: 1.3
# 723:c48e0ee3a8b3 12-Jul-2018 Max Romanov

Enabled body buffer shared memory segmentation.

Changeset #699 fixes shared memory allocation: continous buffer with
requested size should be allocated or function failed. For body longer
than 10 M

Enabled body buffer shared memory segmentation.

Changeset #699 fixes shared memory allocation: continous buffer with
requested size should be allocated or function failed. For body longer
than 10 Mb, this allocation will definitely fails.

For body buffer it is not required to send it in a single continous buffer,
so, need to request minimum reasonable amount of shared memory and try to
extend it, if possible or allocate next buffer.

show more ...


# 699:4712cdf25154 20-Jun-2018 Max Romanov

Fixed allocation of multiple shared memory chunks.

Previously, one shared memory chunk was allocated under mutex and other
chunks (if required) were allocated using atomic operations. So such
alloc

Fixed allocation of multiple shared memory chunks.

Previously, one shared memory chunk was allocated under mutex and other
chunks (if required) were allocated using atomic operations. So such
allocation is not guaranteed and the result buffer can be less than
requested.

This commit moves multiple chunks allocation under mutex and guarantees
the result buffer is large enough.

show more ...


Revision tags: 1.2, 1.1, 1.0
# 613:e5dd7bc63d59 05-Apr-2018 Valentin Bartenev

Style.


Revision tags: 0.7
# 566:6ff12ca9e17e 06-Mar-2018 Sergey Kandaurov

Added support for shm_open(SHM_ANON) extension.


# 564:762f8c976ead 05-Mar-2018 Valentin Bartenev

Reduced number of critical log levels.


# 551:220b0834790b 20-Feb-2018 Max Romanov

Removed unwanted assertions.


Revision tags: 0.6
# 538:2d66e6b0e50f 09-Feb-2018 Valentin Bartenev

Made nxt_assert() statements to be compiled only with debug.


Revision tags: 0.5
# 521:93dc4a28dd37 07-Feb-2018 Andrey Zelenkov

Style fixes.


# 494:7c83ddcc1c42 24-Jan-2018 Sergey Kandaurov

Fixed formatting in nxt_sprintf() and logging.


Revision tags: 0.4
# 461:4d7e73b40330 11-Jan-2018 Igor Sysoev

Fixed DragonFly BSD shared memory implementation.


Revision tags: 0.3
# 430:3a24c399394f 28-Dec-2017 Igor Sysoev

Changed nxt_mp_retain() and nxt_mp_release() interfaces.


# 423:449f2a9c5e62 27-Dec-2017 Max Romanov

Implementing the ability to cancel request before worker starts processing it.


12