Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: remove non-Linux support from all build paths #5941

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ XXX

This release
- introduces fuses against ill-considered use of NDCTL_ENABLE=n
- PMEMOBJ_IGNORE_DIRTY_SHUTDOWN and PMEMOBJ_IGNORE_BAD_BLOCKS are required to acknowledge the understanding of what production-critical functions are missing for the build without NDCTL
- PMEMOBJ_IGNORE_DIRTY_SHUTDOWN and PMEMOBJ_IGNORE_BAD_BLOCKS are required
to acknowledge the understanding of what production-critical functions
are missing for the build without NDCTL
- does not allow opening pmem pool without unsafe shoutdown counter if not explicitly disabled
- remove support for build time define NO_LIBPTHREAD
- remove non-Linux support from all compilation paths (OS_KERNEL_NAME)

Mon Dec 4 2023 Oksana Sałyk <oksana.salyk@intel.com>

Expand All @@ -17,7 +20,6 @@ Mon Dec 4 2023 Oksana Sałyk <oksana.salyk@intel.com>
- Reduces libpmemobj's stack usage below the 11kB threshold.
- Fixing minor Coverity issues
- Add a new toolset for stack usage analysis (https://github.com/pmem/pmdk/tree/master/utils/call_stacks_analysis)


Tue Aug 8 2023 Oksana Sałyk <oksana.salyk@intel.com>

Expand Down
6 changes: 0 additions & 6 deletions src/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ GCOV_LIBS=-lgcov

LIBS += $(EXTRA_LIBS)

ifeq ($(OS_KERNEL_NAME),)
export OS_KERNEL_NAME := $(shell uname -s)
endif

osdep = $(1)_$(shell echo $(OS_KERNEL_NAME) | tr "[:upper:]" "[:lower:]")$(2)

get_arch = $(shell $(CC) -dumpmachine | awk -F'[/-]' '{print $$1}')
ifeq ($(ARCH),)
export ARCH := $(call get_arch)
Expand Down
30 changes: 6 additions & 24 deletions src/common/pmemcommon.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2019, Intel Corporation
# Copyright 2017-2023, Intel Corporation
#
# src/pmemcommon.inc -- common SOURCE definitions for PMDK libraries
#
Expand All @@ -22,37 +22,19 @@ SOURCE +=\
$(COMMON)/set.c\
$(COMMON)/shutdown_state.c\
$(COMMON)/uuid.c\
$(call osdep, $(COMMON)/uuid,.c)\
$(COMMON)/uuid_linux.c\
$(PMEM2)/pmem2_utils.c\
$(PMEM2)/config.c\
$(PMEM2)/persist_posix.c\
$(PMEM2)/badblocks.c\
$(PMEM2)/badblocks_$(OS_DIMM).c\
$(PMEM2)/usc_$(OS_DIMM).c\
$(PMEM2)/source.c\
$(PMEM2)/source_posix.c

ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
$(PMEM2)/source_posix.c\
$(PMEM2)/auto_flush_linux.c\
$(PMEM2)/deep_flush_linux.c\
$(PMEM2)/extent_linux.c\
$(PMEM2)/pmem2_utils_linux.c\
$(PMEM2)/pmem2_utils_$(OS_DIMM).c
else
SOURCE +=\
$(PMEM2)/auto_flush_none.c\
$(PMEM2)/deep_flush_other.c\
$(PMEM2)/extent_none.c\
$(PMEM2)/pmem2_utils_other.c
endif

ifeq ($(OS_DIMM),ndctl)
SOURCE +=\
$(PMEM2)/region_namespace_ndctl.c\
$(PMEM2)/numa_ndctl.c
else
SOURCE +=\
$(PMEM2)/region_namespace_none.c\
$(PMEM2)/numa_none.c
endif
$(PMEM2)/pmem2_utils_$(OS_DIMM).c\
$(PMEM2)/region_namespace_$(OS_DIMM).c\
$(PMEM2)/numa_$(OS_DIMM).c
25 changes: 4 additions & 21 deletions src/libpmem/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,13 @@ SOURCE =\
$(PMEM2)/config.c\
$(PMEM2)/persist_posix.c\
$(PMEM2)/source.c\
$(PMEM2)/source_posix.c

ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
$(PMEM2)/source_posix.c\
$(PMEM2)/pmem2_utils_linux.c\
$(PMEM2)/pmem2_utils_$(OS_DIMM).c\
$(PMEM2)/auto_flush_linux.c\
$(PMEM2)/deep_flush_linux.c
else
SOURCE +=\
$(PMEM2)/pmem2_utils_other.c\
$(PMEM2)/auto_flush_none.c\
$(PMEM2)/deep_flush_other.c
endif

ifeq ($(OS_DIMM),ndctl)
SOURCE +=\
region_namespace_ndctl.c\
numa_ndctl.c
else
SOURCE +=\
region_namespace_none.c\
numa_none.c
endif
$(PMEM2)/deep_flush_linux.c\
$(PMEM2)/region_namespace_$(OS_DIMM).c\
$(PMEM2)/numa_$(OS_DIMM).c

INCS += -I$(TOP)/src/libpmem2

Expand Down
26 changes: 4 additions & 22 deletions src/libpmem2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,14 @@ SOURCE =\
source.c\
source_posix.c\
vm_reservation.c\
vm_reservation_posix.c

ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
vm_reservation_posix.c\
auto_flush_linux.c\
deep_flush_linux.c\
extent_linux.c\
pmem2_utils_linux.c\
pmem2_utils_$(OS_DIMM).c
else
SOURCE +=\
auto_flush_none.c\
deep_flush_other.c\
extent_none.c\
pmem2_utils_other.c
endif

ifeq ($(OS_DIMM),ndctl)
SOURCE +=\
region_namespace_ndctl.c\
numa_ndctl.c
else
SOURCE +=\
region_namespace_none.c\
numa_none.c
endif
pmem2_utils_$(OS_DIMM).c\
region_namespace_$(OS_DIMM).c\
numa_$(OS_DIMM).c

include $(ARCH)/sources.inc

Expand Down
16 changes: 0 additions & 16 deletions src/libpmem2/auto_flush_none.c

This file was deleted.

49 changes: 0 additions & 49 deletions src/libpmem2/deep_flush_other.c

This file was deleted.

31 changes: 0 additions & 31 deletions src/libpmem2/extent_none.c

This file was deleted.

56 changes: 0 additions & 56 deletions src/libpmem2/pmem2_utils_other.c

This file was deleted.