suricata
util-hugepages.c File Reference
#include "suricata.h"
#include "util-debug.h"
#include "util-hugepages.h"
#include "util-path.h"
Include dependency graph for util-hugepages.c:

Go to the source code of this file.

Typedefs

typedef enum OSHugepageAction_ OSHugepageAction
 

Enumerations

enum  OSHugepageAction_ { OS_UNKNOWN, OS_LINUX_SYS_DEVICES }
 

Functions

void SystemHugepageSnapshotDestroy (SystemHugepageSnapshot *s)
 
SystemHugepageSnapshotSystemHugepageSnapshotCreate (void)
 The function creates a snapshot of the system's hugepage usage per NUMA node and per hugepage size. The snapshot is used to evaluate the system's hugepage usage after initialization of Suricata. More...
 
void SystemHugepageEvaluateHugepages (SystemHugepageSnapshot *pre_s, SystemHugepageSnapshot *post_s)
 The function compares two hugepage snapshots and prints out recommendations for hugepage configuration. More...
 

Detailed Description

Author
Lukas Sismis lsism.nosp@m.is@o.nosp@m.isf.n.nosp@m.et

Definition in file util-hugepages.c.

Typedef Documentation

◆ OSHugepageAction

Enumeration Type Documentation

◆ OSHugepageAction_

Enumerator
OS_UNKNOWN 
OS_LINUX_SYS_DEVICES 

Definition at line 40 of file util-hugepages.c.

Function Documentation

◆ SystemHugepageEvaluateHugepages()

void SystemHugepageEvaluateHugepages ( SystemHugepageSnapshot pre_s,
SystemHugepageSnapshot post_s 
)

The function compares two hugepage snapshots and prints out recommendations for hugepage configuration.

Parameters
[in]pre_sa pointer to the snapshot taken before Suricata initialization
[in]post_sa pointer to the snapshot taken after Suricata initialization

Definition at line 363 of file util-hugepages.c.

◆ SystemHugepageSnapshotCreate()

SystemHugepageSnapshot* SystemHugepageSnapshotCreate ( void  )

The function creates a snapshot of the system's hugepage usage per NUMA node and per hugepage size. The snapshot is used to evaluate the system's hugepage usage after initialization of Suricata.

Returns
a pointer to the snapshot, NULL on error

Definition at line 323 of file util-hugepages.c.

◆ SystemHugepageSnapshotDestroy()

void SystemHugepageSnapshotDestroy ( SystemHugepageSnapshot s)

Definition at line 304 of file util-hugepages.c.

References SystemHugepageSnapshot::num_nodes.

Referenced by SuricataPostInit().

Here is the caller graph for this function: