24#include <seastar/util/spinlock.hh>
25#include <seastar/util/modules.hh>
35#include <unordered_map>
36#ifdef SEASTAR_HAVE_HWLOC
43cpu_set_t cpuid_to_cpuset(
unsigned cpuid);
51using cpuset = std::set<unsigned>;
54std::optional<cpuset> parse_cpuset(std::string value);
57namespace hwloc::internal {
59#ifdef SEASTAR_HAVE_HWLOC
60class topology_holder {
61 hwloc_topology_t _topology;
64 topology_holder() noexcept
68 topology_holder(topology_holder&& o)
noexcept;
72 topology_holder& operator=(topology_holder&& o)
noexcept;
74 operator bool() const noexcept {
75 return _topology !=
nullptr;
79 hwloc_topology_t get();
90SEASTAR_MODULE_EXPORT_BEGIN
93 optional<size_t> total_memory;
94 optional<size_t> reserve_memory;
95 size_t reserve_additional_memory_per_shard;
98 bool assign_orphan_cpus =
false;
99 std::vector<dev_t> devices;
100 unsigned num_io_groups;
111 std::vector<std::unique_ptr<io_queue>> queues;
112 std::vector<unsigned> shard_to_group;
113 std::vector<unsigned> shards_in_group;
114 std::vector<std::shared_ptr<io_group>> groups;
126 std::vector<memory> mem;
130 std::vector<cpu> cpus;
131 std::unordered_map<dev_t, io_queue_topology> ioq_topology;
132 std::unordered_map<
unsigned , cpuset> numa_node_id_to_cpuset;
138SEASTAR_MODULE_EXPORT_END
140std::optional<resource::cpuset> parse_cpuset(std::string value);
Definition: spinlock.hh:88
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
Definition: resource.hh:92
Definition: resource.hh:124
Definition: resource.hh:84
Definition: resource.hh:110
Definition: resource.hh:104
Definition: resource.hh:129