<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Huh?  Very little of the client is used on the server.  The vast majority of the client is llite, vvp, then lov, osc, and mdc.  These are not used on the servers at all, the modules won't even be loaded.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Servers are definitely *not* clients of one another in the sense of "Lustre clients".  They interact with each other, but in a manner very different from client to server.<br>
<br>
The ldlm and ptlrpc layers are *partly* shared, and of course, the networking from lnet down is.  But that's not "the client".<br>
<br>
The statement that the server layer is a middle layer on top of the client code doesn't make any sense to me.  It's like this:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">vfs<br>
client code</p>
<p style="margin-top:0;margin-bottom:0">ptlrpc</p>
<p style="margin-top:0;margin-bottom:0">networking</p>
<p style="margin-top:0;margin-bottom:0">------ PHYSICAL BOUNDARY --------<br>
networking</p>
<p style="margin-top:0;margin-bottom:0">ptlrpc</p>
<p style="margin-top:0;margin-bottom:0">server code</p>
<p style="margin-top:0;margin-bottom:0">ldiskfs</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">with LDLM also being explicitly shared, though client & server code is not all shared.  Very little to nothing outside of the networking & ldlm layers is shared.</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lustre-devel <lustre-devel-bounces@lists.lustre.org> on behalf of James Simmons <jsimmons@infradead.org><br>
<b>Sent:</b> Wednesday, June 20, 2018 8:48:07 PM<br>
<b>To:</b> NeilBrown<br>
<b>Cc:</b> Oleg Drokin; Andreas Dilger; Lustre Development List<br>
<b>Subject:</b> Re: [lustre-devel] [PATCH 00/24] lustre - more cleanups including module reduction.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
> Here are a bunch more cleanups that will appear in my lustre-testing<br>
> tree shortly.<br>
> <br>
> The interesting stuff is some enhancements to kbuild to let us<br>
> build modules from multiple directories.<br>
> I've used that to clean up the build of ptlrpc+ldlm and to<br>
> merge libcfs and lnet into the one module - I've left the lnds<br>
> separate.<br>
<br>
That looks pretty good. It doesn't apply to the stable lustre tree but I<br>
did try it out on lustre-testing. The module building does seem to <br>
function well. Only thing not clear is if do a<br>
<br>
make SUBDIRS=drivers/staging/lustre/lustre/lmv modules<br>
<br>
do lmv.a and the other *.a files get relinked int lustre.ko ?<br>
 <br>
> I've haven't progressed further in lustre because I'm not sure which -<br>
> if any - modules are also used by the server.<br>
> I'd rather shared code was in a separate module to client-only.<br>
><br>
> Which parts of lustre/lustre/* are also used by server?<br>
<br>
Basically all the client code is reused on the server except for llite.<br>
The reason is each server type MDS, MGS, or OSS is treated as a client<br>
to each other. So in affect the server code is a middle layer level on<br>
top of the client code.<br>
<br>
> After that, it is all fairly simple cleanups.<br>
> <br>
> I plan to submit the kbuild stuff upstream next week.<br>
> <br>
> Thanks,<br>
> NeilBrown<br>
> <br>
> ---<br>
> <br>
> NeilBrown (24):<br>
>       kbuild: detect directories in components of a module.<br>
>       kbuild: treat a directory listed in a composite object as foo/mod.a<br>
>       kbuild: support building of per-directory mod.a<br>
>       kbuild: disable KBUILD_MODNAME when building for mod.a<br>
>       kbuild: Add documentation for modobj-m<br>
>       lustre: build ldlm in the ldlm directory.<br>
>       lustre: merge libcfs module into lnet.<br>
<br>
This seems to work when I tried the lustre-testing tree. I did see <br>
regression to related to this work in that tree.<br>
<br>
>       lustre: use truncate_inode_page in place of truncate_complete_page<br>
>       lustre: don't use spare bits in iattr.ia_valid<br>
>       lustre: remove lustre_patchless_compat.h<br>
>       lustre: discard current_n*groups macros.<br>
>       lustre: discard LTIME_S macro<br>
>       lustre: discard NO_QUOTA and QUOTA_OK<br>
>       lustre: discard ext2* bit operations<br>
>       lustre: centralize TIMES_SET_FLAGS<br>
>       lustre: remove redefinition of module_init().<br>
>       lustre: remove lustre_compat.h<br>
<br>
The first two patches of the above seem to break things. The first one was <br>
pointed out so I avoid issues in my testing by changing the patch to just<br>
move truncate_inode_page() to lustre_mdc.h for now. The next patch does <br>
break things.<br>
<br>
>       lustre/lnet: move tracefile locking from linux-tracefile.c to tracefile.c<br>
>       lustre: open code cfs_trace_max_debug_mb() into cfs_trace_set_debug_mb()<br>
>       lustre: move tcd locking across to tracefile.c<br>
>       lustre: move remainder of linux-tracefile.c to tracefile.c<br>
>       lustre: fold cfs_tracefile_*_arch into their only callers.<br>
>       lustre: renamed CFS_TCD_TYPE_MAX to CFS_TCD_TYPE_CNT<br>
>       lustre: discard TCD_MAX_TYPES<br>
<br>
I see breakage in this code as well.<br>
<br>
>  Documentation/kbuild/makefiles.txt                 |   65 +++++<br>
>  drivers/staging/lustre/lnet/Makefile               |    7 -<br>
>  drivers/staging/lustre/lnet/libcfs/Makefile        |    7 -<br>
>  drivers/staging/lustre/lnet/libcfs/debug.c         |    6 <br>
>  .../staging/lustre/lnet/libcfs/linux-tracefile.c   |  258 --------------------<br>
>  drivers/staging/lustre/lnet/libcfs/module.c        |   26 +-<br>
>  drivers/staging/lustre/lnet/libcfs/tracefile.c     |  241 +++++++++++++++++--<br>
>  drivers/staging/lustre/lnet/libcfs/tracefile.h     |   40 ---<br>
>  drivers/staging/lustre/lnet/lnet/Makefile          |   11 -<br>
>  drivers/staging/lustre/lnet/lnet/module.c          |    9 +<br>
>  drivers/staging/lustre/lustre/fid/lproc_fid.c      |    1 <br>
>  drivers/staging/lustre/lustre/fld/lproc_fld.c      |    1 <br>
>  drivers/staging/lustre/lustre/include/cl_object.h  |    6 <br>
>  .../staging/lustre/lustre/include/lustre_compat.h  |   82 ------<br>
>  drivers/staging/lustre/lustre/include/lustre_net.h |    1 <br>
>  .../lustre/include/lustre_patchless_compat.h       |   68 -----<br>
>  drivers/staging/lustre/lustre/include/obd.h        |    7 +<br>
>  .../staging/lustre/lustre/include/obd_support.h    |    1 <br>
>  drivers/staging/lustre/lustre/ldlm/Makefile        |   11 +<br>
>  drivers/staging/lustre/lustre/llite/dir.c          |    3 <br>
>  drivers/staging/lustre/lustre/llite/file.c         |   36 +--<br>
>  drivers/staging/lustre/lustre/llite/lcommon_cl.c   |   11 -<br>
>  .../staging/lustre/lustre/llite/llite_internal.h   |   13 +<br>
>  drivers/staging/lustre/lustre/llite/llite_lib.c    |   52 ++--<br>
>  drivers/staging/lustre/lustre/llite/namei.c        |   16 +<br>
>  drivers/staging/lustre/lustre/llite/vvp_io.c       |    8 -<br>
>  drivers/staging/lustre/lustre/llite/vvp_object.c   |    6 <br>
>  drivers/staging/lustre/lustre/lmv/lmv_intent.c     |    6 <br>
>  drivers/staging/lustre/lustre/lmv/lmv_obd.c        |   21 +-<br>
>  drivers/staging/lustre/lustre/lov/lov_io.c         |    3 <br>
>  drivers/staging/lustre/lustre/lov/lov_obd.c        |    2 <br>
>  drivers/staging/lustre/lustre/lov/lov_pack.c       |    1 <br>
>  drivers/staging/lustre/lustre/lov/lov_page.c       |    1 <br>
>  drivers/staging/lustre/lustre/mdc/mdc_lib.c        |   19 +<br>
>  drivers/staging/lustre/lustre/mdc/mdc_reint.c      |    4 <br>
>  drivers/staging/lustre/lustre/mdc/mdc_request.c    |   12 -<br>
>  drivers/staging/lustre/lustre/obdclass/class_obd.c |    1 <br>
>  drivers/staging/lustre/lustre/obdclass/llog.c      |    7 -<br>
>  .../lustre/lustre/obdclass/lprocfs_status.c        |    1 <br>
>  .../staging/lustre/lustre/obdclass/obd_config.c    |    1 <br>
>  drivers/staging/lustre/lustre/obdclass/obd_mount.c |    1 <br>
>  drivers/staging/lustre/lustre/obdclass/obdo.c      |   10 -<br>
>  .../staging/lustre/lustre/obdecho/echo_client.c    |    1 <br>
>  drivers/staging/lustre/lustre/osc/lproc_osc.c      |    1 <br>
>  drivers/staging/lustre/lustre/osc/osc_cache.c      |    4 <br>
>  drivers/staging/lustre/lustre/osc/osc_io.c         |   23 +-<br>
>  drivers/staging/lustre/lustre/osc/osc_quota.c      |    4 <br>
>  drivers/staging/lustre/lustre/osc/osc_request.c    |    1 <br>
>  drivers/staging/lustre/lustre/ptlrpc/Makefile      |   12 -<br>
>  drivers/staging/lustre/lustre/ptlrpc/import.c      |    1 <br>
>  .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c    |    1 <br>
>  drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c     |    1 <br>
>  drivers/staging/lustre/lustre/ptlrpc/sec.c         |   15 +<br>
>  drivers/staging/lustre/lustre/ptlrpc/sec_plain.c   |    1 <br>
>  drivers/staging/lustre/lustre/ptlrpc/service.c     |    1 <br>
>  scripts/Makefile.build                             |   57 +++-<br>
>  scripts/Makefile.lib                               |   63 +++--<br>
>  57 files changed, 584 insertions(+), 685 deletions(-)<br>
>  delete mode 100644 drivers/staging/lustre/lnet/libcfs/linux-tracefile.c<br>
>  delete mode 100644 drivers/staging/lustre/lustre/include/lustre_compat.h<br>
>  delete mode 100644 drivers/staging/lustre/lustre/include/lustre_patchless_compat.h<br>
>  create mode 100644 drivers/staging/lustre/lustre/ldlm/Makefile<br>
> <br>
> --<br>
> Signature<br>
> <br>
> <br>
_______________________________________________<br>
lustre-devel mailing list<br>
lustre-devel@lists.lustre.org<br>
<a href="http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org</a><br>
</div>
</span></font></div>
</body>
</html>