suricata
util-hugepages.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HugepageInfo
 
struct  NodeInfo
 
struct  SystemHugepageSnapshot
 

Functions

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.
 
void SystemHugepageSnapshotDestroy (SystemHugepageSnapshot *s)
 
void SystemHugepageEvaluateHugepages (SystemHugepageSnapshot *pre_s, SystemHugepageSnapshot *post_s)
 The function compares two hugepage snapshots and prints out recommendations for hugepage configuration.
 

Detailed Description

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

Definition in file util-hugepages.h.

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.

References FatalError, HugepageInfo::free, NodeInfo::hugepages, SystemHugepageSnapshot::nodes, NodeInfo::num_hugepage_sizes, SystemHugepageSnapshot::num_nodes, SCLogDebug, SCLogPerf, SCLogWarning, and HugepageInfo::size_kb.

Referenced by SuricataPostInit().

Here is the caller graph for this function:

◆ 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.

References FatalError, SystemHugepageSnapshot::nodes, SystemHugepageSnapshot::num_nodes, SCCalloc, SCFree, SCLogInfo, and SystemHugepageSnapshotDestroy().

Referenced by SuricataInit(), and SuricataPostInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SystemHugepageSnapshotDestroy()

void SystemHugepageSnapshotDestroy ( SystemHugepageSnapshot s)

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

References SystemHugepageSnapshot::nodes, SystemHugepageSnapshot::num_nodes, and SCFree.

Referenced by SuricataPostInit(), and SystemHugepageSnapshotCreate().

Here is the caller graph for this function: