<s>
CIFSD	B-Application
is	O
an	O
open-source	B-Application
in-kernel	O
CIFS/SMB	B-Operating_System
server	O
created	O
by	O
Namjae	O
Jeon	O
for	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
Initially	O
the	O
goal	O
is	O
to	O
provide	O
improved	O
file	O
I/O	O
performance	O
,	O
but	O
the	O
bigger	O
goal	O
is	O
to	O
have	O
some	O
new	O
features	O
which	O
are	O
much	O
easier	O
to	O
develop	O
and	O
maintain	O
inside	O
the	O
kernel	B-Operating_System
and	O
expose	O
the	O
layers	O
fully	O
.	O
</s>
<s>
Directions	O
can	O
be	O
attributed	O
to	O
sections	O
where	O
Samba	B-Language
is	O
moving	O
to	O
a	O
few	O
modules	O
inside	O
the	O
kernel	B-Operating_System
to	O
have	O
features	O
like	O
Remote	B-General_Concept
direct	I-General_Concept
memory	I-General_Concept
access	I-General_Concept
(	O
RDMA	B-General_Concept
)	O
to	O
work	O
with	O
actual	O
performance	O
gain	O
.	O
</s>
<s>
So	O
,	O
DCE/RPC	B-General_Concept
management	O
that	O
has	O
historically	O
resulted	O
into	O
number	O
of	O
buffer	O
overflow	O
issues	O
and	O
dangerous	O
security	O
bugs	O
and	O
winreg	O
and	O
user	O
account	O
management	O
are	O
implemented	O
in	O
user	O
space	O
as	O
ksmbd.mountd	O
.	O
</s>
<s>
are	O
in	O
kernel	B-Operating_System
space	O
(	O
ksmbd	O
)	O
.	O
</s>
<s>
When	O
the	O
server	O
daemon	O
is	O
started	O
,	O
it	O
starts	O
up	O
a	O
forker	O
thread	O
(	O
ksmbd/0	O
)	O
at	O
initialization	O
time	O
and	O
opens	O
a	O
dedicated	O
port	B-Operating_System
445	I-Operating_System
for	O
listening	O
to	O
SMB	B-Operating_System
requests	O
.	O
</s>
<s>
It	O
allows	O
for	O
parallel	O
processing	O
of	O
SMB	B-Operating_System
requests	O
(	O
commands	O
)	O
from	O
clients	O
as	O
well	O
as	O
allowing	O
for	O
new	O
clients	O
to	O
make	O
new	O
connections	O
.	O
</s>
<s>
Depending	O
on	O
the	O
SMB	B-Operating_System
request	O
types	O
,	O
each	O
new	O
thread	O
can	O
decide	O
to	O
pass	O
through	O
the	O
commands	O
to	O
the	O
user	O
space	O
(	O
ksmbd.mountd	O
)	O
.	O
</s>
<s>
Currently	O
DCE/RPC	B-General_Concept
commands	O
are	O
identified	O
to	O
be	O
handled	O
through	O
the	O
user	O
space	O
.	O
</s>
<s>
To	O
further	O
utilize	O
the	O
linux	B-Operating_System
kernel	I-Operating_System
,	O
it	O
has	O
been	O
chosen	O
to	O
process	O
the	O
commands	O
as	O
default	O
workitems	O
to	O
be	O
executed	O
in	O
the	O
handlers	O
of	O
the	O
default	O
kworker	O
threads	O
.	O
</s>
<s>
It	O
allows	O
for	O
multiplexing	O
of	O
the	O
handlers	O
as	O
the	O
kernel	B-Operating_System
take	O
care	O
of	O
initiating	O
extra	O
worker	O
threads	O
if	O
the	O
load	O
is	O
increased	O
and	O
vice	O
versa	O
,	O
if	O
the	O
load	O
is	O
decreased	O
it	O
destroys	O
the	O
extra	O
worker	O
threads	O
.	O
</s>
<s>
So	O
,	O
after	O
connection	O
is	O
established	O
with	O
the	O
client	O
,	O
a	O
dedicated	O
ksmbd	O
task	O
takes	O
complete	O
ownership	O
of	O
the	O
receiving	O
and	O
parsing	O
of	O
SMB	B-Operating_System
commands	O
.	O
</s>
<s>
After	O
receiving	O
each	O
command	O
a	O
separated	O
kernel	B-Operating_System
workitem	O
is	O
prepared	O
for	O
each	O
command	O
which	O
is	O
further	O
queued	O
to	O
be	O
handled	O
by	O
default	O
kworker'threads	O
inside	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
So	O
,	O
each	O
SMB	B-Operating_System
workitem	O
is	O
queued	O
to	O
the	O
kworkers	O
.	O
</s>
<s>
This	O
allows	O
the	O
benefit	O
of	O
load	O
sharing	O
to	O
be	O
managed	O
optimally	O
by	O
the	O
default	O
kernel	B-Operating_System
and	O
optimizes	O
client	O
performance	O
by	O
handling	O
client	O
commands	O
in	O
parallel	O
.	O
</s>
<s>
Further	O
it	O
allows	O
sharing	O
information	O
parameters	O
that	O
parsed	O
from	O
smb.conf	B-Language
to	O
smb	B-Operating_System
export	O
layer	O
in	O
kernel	B-Operating_System
.	O
</s>
<s>
For	O
the	O
execution	O
part	O
it	O
has	O
a	O
daemon	O
which	O
is	O
continuously	O
running	O
and	O
connected	O
to	O
the	O
kernel	B-Operating_System
interface	O
using	O
netlink	O
socket	O
,	O
it	O
waits	O
for	O
the	O
requests	O
(	O
dcerpc	B-General_Concept
and	O
winreg	O
)	O
.	O
</s>
<s>
Complete	O
DCE/RPC	B-General_Concept
response	O
is	O
prepared	O
from	O
the	O
user	O
space	O
and	O
passed	O
over	O
to	O
the	O
associated	O
kernel	B-Operating_System
thread	O
for	O
the	O
client	O
.	O
</s>
