kaleb@redhat.com has uploaded this change for review.

View Change

RFC: [do not merge] (lib)ganesha_nfsd as a DSO

Build ganesha as a DSO, i.e. libganesha_nfsd.so.

Take Two-dot-two, addressing comments from the first go-around.
(not building src/tools to see if this will get past CEA-HPC
because tools is trying to link with -lrados_recov for some reason.)

The ganesha.nfsd daemon consists of just nfs_main:main() and is
linked with the DSO.

Then all the FSALs (except FSAL_PSEUDO and FSAL_MDCACHE*) are linked
with libganesha_nfsd to resolve functions in ganesha.nfsd itself.

This will be required if, e.g., Fedora, decides to require default
linking with '-z defs'. They tried to do it for F29 but retreated
when they found that too many applications broke. In the end this may
all be just an exercise in "truth and beauty."

*FSAL_PSEUDO and FSAL_MDCACHE are special; they are included in the
DSO so do not need to be (and can't be) linked with the DSO.

A few other things that could be done are
1) link libganesha_nfsd.so with a .sym file to explicitly control which
symbols are exposed or visible to the outside world.
2) build with -flto (Link Time Optimization)
Annecdotes claim a 5-10% speed improvement is typical, and some
applications have seen as much as 45-50% boost. Of course we have to
do the experiment to see what we really achieve.
3) don't link ganesha.nfsd with -bdynamic as it's no longer needed

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Change-Id: I31095bf24f80ae24984f26e242be5ded01dd03d2
---
M src/CMakeLists.txt
M src/FSAL/CMakeLists.txt
M src/FSAL/FSAL_CEPH/CMakeLists.txt
M src/FSAL/FSAL_GLUSTER/CMakeLists.txt
M src/FSAL/FSAL_GPFS/CMakeLists.txt
M src/FSAL/FSAL_MEM/CMakeLists.txt
M src/FSAL/FSAL_PROXY/CMakeLists.txt
M src/FSAL/FSAL_RGW/CMakeLists.txt
M src/FSAL/FSAL_VFS/panfs/CMakeLists.txt
M src/FSAL/FSAL_VFS/vfs/CMakeLists.txt
M src/FSAL/FSAL_VFS/xfs/CMakeLists.txt
M src/FSAL/Stackable_FSALs/CMakeLists.txt
M src/MainNFSD/CMakeLists.txt
M src/SAL/recovery/recovery_fs_ng.c
M src/config_parsing/CMakeLists.txt
M src/nfs-ganesha.spec-in.cmake
M src/support/murmur3.c
17 files changed, 561 insertions(+), 51 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/80/447380/1

To view, visit change 447380. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I31095bf24f80ae24984f26e242be5ded01dd03d2
Gerrit-Change-Number: 447380
Gerrit-PatchSet: 1
Gerrit-Owner: kaleb@redhat.com
Gerrit-MessageType: newchange