| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Aug 17 14:28:51 CEST 2018 on sn-devel-144
|
|
|
|
|
| |
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
|
|
|
|
|
| |
The consolidation will soon be done by a separate process. We need to
avoid the getpid() call in smbprofile_cleanup().
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
|
|
|
|
|
|
|
|
|
|
| |
I still need to fix the rpc stuff, but we are almost there.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 14 22:16:56 CEST 2015 on sn-devel-104
|
|
|
|
|
| |
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What?
This patch gets rid of the central shared memory segment referenced by
"profile_p". Instead, every smbd gets a static profile_area where it collects
profiling data. Once a second, every smbd writes this profiling data into a
record of its own in a "smbprofile.tdb". smbstatus -P does a tdb_traverse on this
database and sums up what it finds.
Why?
At least in my perception sysv IPC has not the best reputation on earth. The
code before this patch uses shmat(). Samba ages ago has developed a good
abstraction of shared memory: It's called tdb.
The main reason why I started this is that I have a request to become
more flexible with profiling data. Samba should be able to collect data
per share or per user, something which is almost impossible to do with
a fixed structure. My idea is to for example install a profile area per
share and every second marshall this into one tdb record indexed by share
name. smbstatus -P would then also collect the data and either aggregate
them or put them into individual per-share statistics. This flexibility
in the data model is not really possible with one fixed structure.
But isn't it slow?
Well, I don't think so. I can't really prove it, but I do believe that on large
boxes atomically incrementing a shared memory value for every SMB does show up
due to NUMA effects. With this patch the hot code path is completely
process-local. Once a second every smbd writes into a central tdb, this of
course does atomic operations. But it's once a second, not on every SMB2 read.
There's two places where I would like to improve things: With the current code
all smbds wake up once a second. With 10,000 potentially idle smbds this will
become noticable. That's why the current only starts the timer when something has
changed.
The second place is the tdb traverse: Right now traverse is blocking in the
sense that when it has to switch hash chains it will block. With mutexes, this
means a syscall. I have a traverse light in mind that works as follows: It
assumes a locked hash chain and then walks the complete chain in one run
without unlocking in between. This way the caller can do nonblocking locks in
the first round and only do blocking locks in a second round. Also, a lot of
syscall overhead will vanish. This way smbstatus -P will have almost zero
impact on normal operations.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now autogenerate a lot of code using
SMBPROFILE_STATS_ALL_SECTIONS macro which expands to
different SMBPROFILE_STATS_{COUNT,BASIC,BYTES,IOBYTES} macros.
This also allows async profiling using:
struct mystate {
...
SMBPROFILE_BASIC_ASYNC_STATE(profile_state);
...
};
...
SMBPROFILE_BASIC_ASYNC_START(SMB2_negotiate, profile_p, mystate->profile_state);
...
SMBPROFILE_BYTES_ASYNC_SET_IDLE(mystate->profile_state);
...
SMBPROFILE_BYTES_ASYNC_SET_BUSY(mystate->profile_state);
...
SMBPROFILE_BASIC_ASYNC_END(mystate->profile_state);
The current START_PROFILE*()/END_PROFILE*() are implemented as legacy wrappers.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
|
| |
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
|
|
| |
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
|
|
|
|
|
|
|
|
| |
This conditional compile avoids some #ifdef WITH_PROFILE, which makes the code
more readable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
|
|
| |
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
|
|
| |
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
|
|
|
|
|
|
|
|
| |
set dir seems to have been a special SMB command used by Pathworks clients
the supporting code for it was already removed in 2007, so just remove all
remnants related to it (smb.conf parameter, documentation, ...)
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 12 01:03:37 CET 2013 on sn-devel-104
|
|
|
|
|
|
|
| |
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 15 13:33:43 CEST 2011 on sn-devel-104
|
|
|
|
|
|
|
| |
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
|
|
|
|
| |
Guenther
|
|
|
|
| |
Guenther
|
|
|
|
| |
Guenther
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vfs_fallocate_mode parameter.
It turns out we need the fallocate operations to be able to both
allocate and extend filesize, and to allocate and not extend
filesize, and posix_fallocate can only do the former. So by defining
the vfs op as posix_fallocate we lose the opportunity to use any
underlying syscalls (like Linux fallocate) that can do the latter
as well.
We don't currently use the non-extending filesize call, but now
I've changed the vfs op definition we can in the future. For the
moment simply map the fallocate op onto posix_fallocate for the
VFS_FALLOCATE_EXTEND_SIZE case and return ENOSYS for the
VFS_FALLOCATE_KEEP_SIZE case.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 18 08:59:27 CET 2010 on sn-devel-104
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
there's no point in not profiling times if no monotonic clock is found -
monotonic and realtime clock are equally fast. Just use clock_gettime_mono
instead.
|
|
|
|
| |
that clock is a CPU burnometer but we need a chronometer for profiling.
|
| |
|
|
|
|
| |
A performance counter was added for every base type of SMB2 op.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this can only be done via fset_nt_acl() using an open
file/directory handle. I'd like to do the same with
get_nt_acl() but am concerned about efficiency
problems with "hide unreadable/hide unwritable" when
doing a directory listing (this would mean opening
every file in the dir on list).
Moving closer to rationalizing the ACL model and
maybe moving the POSIX calls into a posix_acl VFS
module rather than having them as first class citizens
of the VFS.
Jeremy.
(This used to be commit f487f742cb903a06fbf2be006ddc9ce9063339ed)
|
|
|
|
|
|
| |
implementation. Needed for the zero-copy write code.
Jeremy.
(This used to be commit bfbdb6324c5d13bfde8b742e9c5a0e0c9092bd86)
|
|
|
|
|
|
|
|
| |
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
|
|
|
|
|
| |
Guenther
(This used to be commit 205ef6ab3e9332a2a4a4f775c2cdddbcd3ec739d)
|
|
|
|
|
| |
metze
(This used to be commit 6dcbc0b6055998d77bd7bb6acfb622bc1423964b)
|
|
|
|
| |
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
|
|
|
|
|
| |
Jeremy.
(This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
|
|
|
|
| |
(This used to be commit edbeea520727f51568ccd8ffa802e06bd120794c)
|
|
|
|
|
|
|
|
|
|
| |
patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))
Volker
(This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
|
|
|
|
| |
(This used to be commit f8f51e8648224af6645dbd0c2f2bffc678b83dac)
|
|
|
|
|
|
|
|
|
|
|
| |
for utimes - change the call to ntimes. This preserves
nsec timestamps we get from stat (if the system supports
it) and only maps back down to usec or sec resolution
on time set. Looks bigger than it is as I had to move
lots of internal code from using time_t and struct utimebuf
to struct timespec.
Jeremy.
(This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
|
|
|
|
|
| |
Guenther
(This used to be commit bc04004c182b114749d8e33edcf835efb252d35d)
|
|
|
|
|
|
|
|
|
|
| |
it should be abstracted a little higher up so other os'es can have an
entry, but it will take a bit more work. Thanks to Chetan Shringarpure
and Mathias Dietz.
I didn't increment the vfs number again because the kernel change notify
stuff hasn't been released yet anyway.
(This used to be commit 9463211bf3b46ee408b88dfbf42d498e3839d4cc)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
void message_register(int msg_type,
void (*fn)(int msg_type, struct process_id pid,
- void *buf, size_t len))
+ void *buf, size_t len,
+ void *private_data),
+ void *private_data)
{
struct dispatch_fns *dfn;
So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.
Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.
Volker
(This used to be commit c8ae60ed65dcce9660ee39c75488f2838cf9a28b)
|
|
|
|
|
| |
Jeremy.
(This used to be commit 89b7a0630de0bd95a56263b36d433b4e73517a70)
|
|
|
|
|
|
| |
the vfs layer, since gpfs supports it. Thanks to Volker, Christian,
Mathias, Chetan, and Peter.
(This used to be commit 0620658890fa9c68a9848538728023192319c81a)
|
|
|
|
|
|
|
|
| |
to do the upper layer directories but this is what
everyone is waiting for....
Jeremy.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
|
|
|
|
|
|
|
| |
confuse an uninitialised __profile_clock with CLOCK_REALTIME. Flip the
condition argument to SMB_WARN around so that it's correct (though
completely non-intuitive).
(This used to be commit 60b5f9618b77afb397f96c1ff406c8cd3a4648f3)
|
|
|
|
|
|
|
|
| |
This fixes a problem where the clock definition for clock_gettime() is
present at compile time, but is not available on the running system. In
this case, we fall back to less-preferred clocks until we find one that
we can use.
(This used to be commit fc6ed6a1aa2225ccde04c4ecaf0777dc0de4f1cb)
|
|
|
|
|
|
| |
we created the profiling shmem segment and don't bogusly
refuse to look at it.
(This used to be commit eb31ef3a0e5e7c3b4029a3c2e124d2df646f10a2)
|
|
|
|
|
| |
the fastest clock available on uniprocessors.
(This used to be commit d44862928206b524f826bd7c2997ab5353c0b6a0)
|
|
|
|
|
|
| |
globals. This catches mismatched start/end calls and removes
the need for special nested profiling calls.
(This used to be commit ee750498812190edd3ec52ca3c750258f3b8a97a)
|
|
|
|
| |
(This used to be commit 9cd4b894ea1e5c0ccfd50f8d2f84180c702d97ee)
|