Skip to content

Commit

Permalink
common: simplification of OS_DIMM flag handling
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Mar 28, 2024
1 parent e8d1d4d commit d34357a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 92 deletions.
6 changes: 3 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ 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
- pmemobj_open() stack usage reduction below 12kB threshold.
- remove non-Linux support from all compilation paths (OS_KERNEL_NAME)


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

* Version 2.0.1
Expand Down
14 changes: 3 additions & 11 deletions src/common/pmemcommon.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ SOURCE +=\
$(PMEM2)/deep_flush_linux.c\
$(PMEM2)/extent_linux.c\
$(PMEM2)/pmem2_utils_linux.c\
$(PMEM2)/pmem2_utils_$(OS_DIMM).c

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
14 changes: 3 additions & 11 deletions src/libpmem/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,9 @@ SOURCE =\
$(PMEM2)/pmem2_utils_linux.c\
$(PMEM2)/pmem2_utils_$(OS_DIMM).c\
$(PMEM2)/auto_flush_linux.c\
$(PMEM2)/deep_flush_linux.c

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
14 changes: 3 additions & 11 deletions src/libpmem2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,9 @@ SOURCE =\
deep_flush_linux.c\
extent_linux.c\
pmem2_utils_linux.c\
pmem2_utils_$(OS_DIMM).c

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
56 changes: 12 additions & 44 deletions src/test/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,9 @@ OBJS +=\
$(TOP)/src/debug/libpmem2/auto_flush_linux.o\
$(TOP)/src/debug/libpmem2/deep_flush_linux.o\
$(TOP)/src/debug/libpmem2/extent_linux.o\
$(TOP)/src/debug/libpmem2/pmem2_utils_linux.o

ifeq ($(OS_DIMM),ndctl)
OBJS +=\
$(TOP)/src/debug/libpmem2/region_namespace_ndctl.o\
$(TOP)/src/debug/libpmem2/numa_ndctl.o
else
OBJS +=\
$(TOP)/src/debug/libpmem2/region_namespace_none.o\
$(TOP)/src/debug/libpmem2/numa_none.o
endif
$(TOP)/src/debug/libpmem2/pmem2_utils_linux.o\
$(TOP)/src/debug/libpmem2/region_namespace_$(OS_DIMM).o\
$(TOP)/src/debug/libpmem2/numa_$(OS_DIMM).o

include $(TOP)/src/libpmem2/$(ARCH)/sources.inc
OBJS_MEM = $(LIBPMEM2_ARCH_SOURCE:.c=.o)
Expand Down Expand Up @@ -213,17 +205,9 @@ OBJS +=\
$(TOP)/src/nondebug/libpmem2/auto_flush_linux.o\
$(TOP)/src/nondebug/libpmem2/deep_flush_linuc.o\
$(TOP)/src/nondebug/libpmem2/extent_linux.o\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o

ifeq ($(OS_DIMM),ndctl)
OBJS +=\
$(TOP)/src/nondebug/libpmem2/region_namespace_ndctl.o\
$(TOP)/src/nondebug/libpmem2/numa_ndctl.o
else
OBJS +=\
$(TOP)/src/nondebug/libpmem2/region_namespace_none.o\
$(TOP)/src/nondebug/libpmem2/numa_none.o
endif
$(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o\
$(TOP)/src/nondebug/libpmem2/region_namespace_$(OS_DIMM).o\
$(TOP)/src/nondebug/libpmem2/numa_$(OS_DIMM).o

include $(TOP)/src/libpmem2/$(ARCH)/sources.inc
OBJS_MEM = $(LIBPMEM2_ARCH_SOURCE:.c=.o)
Expand Down Expand Up @@ -281,17 +265,9 @@ OBJS +=\
$(TOP)/src/nondebug/libpmem2/auto_flush_linux.o\
$(TOP)/src/nondebug/libpmem2/deep_flush_linux.o\
$(TOP)/src/nondebug/libpmem2/extent_linux.o\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o

ifeq ($(OS_DIMM),ndctl)
OBJS +=\
$(TOP)/src/nondebug/libpmem2/region_namespace_ndctl.o\
$(TOP)/src/nondebug/libpmem2/numa_ndctl.o
else
OBJS +=\
$(TOP)/src/nondebug/libpmem2/region_namespace_none.o\
$(TOP)/src/nondebug/libpmem2/numa_none.o
endif
$(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o\
$(TOP)/src/nondebug/libpmem2/region_namespace_$(OS_DIMM).o\
$(TOP)/src/nondebug/libpmem2/numa_$(OS_DIMM).o

INCS += -I$(TOP)/src/common
endif
Expand Down Expand Up @@ -328,17 +304,9 @@ OBJS +=\
$(TOP)/src/debug/libpmem2/auto_flush_linux.o\
$(TOP)/src/debug/libpmem2/deep_flush_linux.o\
$(TOP)/src/debug/libpmem2/extent_linux.o\
$(TOP)/src/debug/libpmem2/pmem2_utils_linux.o

ifeq ($(OS_DIMM),ndctl)
OBJS +=\
$(TOP)/src/debug/libpmem2/region_namespace_ndctl.o\
$(TOP)/src/debug/libpmem2/numa_ndctl.o
else
OBJS +=\
$(TOP)/src/debug/libpmem2/region_namespace_none.o\
$(TOP)/src/debug/libpmem2/numa_none.o
endif
$(TOP)/src/debug/libpmem2/pmem2_utils_linux.o\
$(TOP)/src/debug/libpmem2/region_namespace_$(OS_DIMM).o\
$(TOP)/src/debug/libpmem2/numa_$(OS_DIMM).o

INCS += -I$(TOP)/src/common
endif
Expand Down
8 changes: 3 additions & 5 deletions src/test/pmem2_persist/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2019-2020, Intel Corporation
# Copyright 2019-2023, Intel Corporation

#
# src/test/pmem2_persist/Makefile -- build pmem2_persist unit test
Expand All @@ -18,13 +18,11 @@ OBJS += pmem2_persist.o\
persist.o\
memops_generic.o\
deep_flush_linux.o\
pmem2_utils_linux.o
pmem2_utils_linux.o\
region_namespace_$(OS_DIMM).o

ifeq ($(OS_DIMM),ndctl)
LINK_NDCTL=y
OBJS += region_namespace_ndctl.o
else
OBJS += region_namespace_none.o
endif

include ../Makefile.inc
9 changes: 2 additions & 7 deletions src/test/tools/extents/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ vpath %.c $(TOP)/src/libpmem2
TARGET = extents
OBJS = extents.o\
pmem2_utils_linux.o\
pmem2_utils.o

ifeq ($(OS_DIMM),ndctl)
OBJS += region_namespace_ndctl.o
else
OBJS += region_namespace_none.o
endif
pmem2_utils.o\
region_namespace_$(OS_DIMM).o

OBJS += extent_linux.o

Expand Down

0 comments on commit d34357a

Please sign in to comment.