public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: bfields@fieldses.org (J. Bruce Fields)
To: Namjae Jeon <namjae.jeon@samsung.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	smfrench@gmail.com, senozhatsky@chromium.org, hyc.lee@gmail.com,
	viro@zeniv.linux.org.uk, hch@lst.de, hch@infradead.org,
	ronniesahlberg@gmail.com, aurelien.aptel@gmail.com,
	aaptel@suse.com, sandeen@sandeen.net, dan.carpenter@oracle.com,
	colin.king@canonical.com, rdunlap@infradead.org,
	willy@infradead.org
Subject: Re: [PATCH v2 00/10] cifsd: introduce new SMB3 kernel server
Date: Tue, 27 Apr 2021 16:53:31 -0400	[thread overview]
Message-ID: <20210427205331.GA15168@fieldses.org> (raw)
In-Reply-To: <20210422002824.12677-1-namjae.jeon@samsung.com>

On Thu, Apr 22, 2021 at 09:28:14AM +0900, Namjae Jeon wrote:
> This is the patch series for cifsd(ksmbd) kernel server.
> 
> What is cifsd(ksmbd) ?
> ======================
> 
> The SMB family of protocols is the most widely deployed
> network filesystem protocol, the default on Windows and Macs (and even
> on many phones and tablets), with clients and servers on all major
> operating systems, but lacked a kernel server for Linux. For many
> cases the current userspace server choices were suboptimal
> either due to memory footprint, performance or difficulty integrating
> well with advanced Linux features.
> 
> ksmbd is a new kernel module which implements the server-side of the SMB3 protocol.
> The target is to provide optimized performance, GPLv2 SMB server, better
> lease handling (distributed caching). The bigger goal is to add new
> features more rapidly (e.g. RDMA aka "smbdirect", and recent encryption
> and signing improvements to the protocol) which are easier to develop
> on a smaller, more tightly optimized kernel server than for example
> in Samba.  The Samba project is much broader in scope (tools, security services,
> LDAP, Active Directory Domain Controller, and a cross platform file server
> for a wider variety of purposes) but the user space file server portion
> of Samba has proved hard to optimize for some Linux workloads, including
> for smaller devices. This is not meant to replace Samba, but rather be
> an extension to allow better optimizing for Linux, and will continue to
> integrate well with Samba user space tools and libraries where appropriate.
> Working with the Samba team we have already made sure that the configuration
> files and xattrs are in a compatible format between the kernel and
> user space server.
> 
> 
> Architecture
> ============
> 
>                |--- ...
>        --------|--- ksmbd/3 - Client 3
>        |-------|--- ksmbd/2 - Client 2
>        |       |         ____________________________________________________
>        |       |        |- Client 1                                          |
> <--- Socket ---|--- ksmbd/1   <<= Authentication : NTLM/NTLM2, Kerberos      |
>        |       |      | |     <<= SMB engine : SMB2, SMB2.1, SMB3, SMB3.0.2, |
>        |       |      | |                SMB3.1.1                            |
>        |       |      | |____________________________________________________|
>        |       |      |
>        |       |      |--- VFS --- Local Filesystem
>        |       |
> KERNEL |--- ksmbd/0(forker kthread)
> ---------------||---------------------------------------------------------------
> USER           ||
>                || communication using NETLINK
>                ||  ______________________________________________
>                || |                                              |
>         ksmbd.mountd <<= DCE/RPC(srvsvc, wkssvc, samr, lsarpc)   |
>                ^  |  <<= configure shares setting, user accounts |
>                |  |______________________________________________|
>                |
>                |------ smb.conf(config file)
>                |
>                |------ ksmbdpwd.db(user account/password file)
>                             ^
>   ksmbd.adduser ---------------|
> 
> The subset of performance related operations(open/read/write/close etc.) belong
> in kernelspace(ksmbd) and the other subset which belong to operations(DCE/RPC,
> user account/share database) which are not really related with performance are
> handled in userspace(ksmbd.mountd).
> 
> When the ksmbd.mountd is started, It starts up a forker thread at initialization
> time and opens a dedicated port 445 for listening to SMB requests. Whenever new
> clients make request, Forker thread will accept the client connection and fork
> a new thread for dedicated communication channel between the client and
> the server.

Judging from the diagram above, all those threads are kernel threads, is
that right?  So a kernel thread gets each call first, then uses netlink
to get help from ksmbd.mountd if necessary, is that right?

--b.

  parent reply	other threads:[~2021-04-27 20:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210422003835epcas1p246c40c6a6bbc0e9f5d4ccf9b69bef0d7@epcas1p2.samsung.com>
2021-04-22  0:28 ` [PATCH v2 00/10] cifsd: introduce new SMB3 kernel server Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 01/10] cifsd: add document Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 02/10] cifsd: add server handler Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 03/10] cifsd: add trasport layers Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 04/10] cifsd: add authentication Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 05/10] cifsd: add smb3 engine part 1 Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 06/10] cifsd: add smb3 engine part 2 Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 07/10] cifsd: add oplock/lease cache mechanism Namjae Jeon
2021-04-28 20:16     ` J. Bruce Fields
2021-04-29  0:36       ` Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 08/10] cifsd: add file operations Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 09/10] cifsd: add Kconfig and Makefile Namjae Jeon
2021-04-22  0:28   ` [PATCH v2 10/10] MAINTAINERS: add cifsd kernel server Namjae Jeon
2021-04-27 20:53   ` J. Bruce Fields [this message]
2021-04-27 21:38     ` [PATCH v2 00/10] cifsd: introduce new SMB3 " Namjae Jeon
2021-04-28 19:13   ` J. Bruce Fields
2021-04-29  0:07     ` Namjae Jeon
2021-04-28 19:18   ` J. Bruce Fields
2021-04-28 20:19     ` Aurélien Aptel
2021-04-28 20:40       ` J. Bruce Fields
2021-04-28 22:24         ` Aurélien Aptel
2021-04-28 23:57           ` J. Bruce Fields
2021-04-29  0:18             ` Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210427205331.GA15168@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=aaptel@suse.com \
    --cc=aurelien.aptel@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=hyc.lee@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    --cc=rdunlap@infradead.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=sandeen@sandeen.net \
    --cc=senozhatsky@chromium.org \
    --cc=smfrench@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox