Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
50607488
Commit
50607488
authored
Dec 17, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the sma and smf locks dynamic.
parent
5cc2036a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
storage_file.c
bin/varnishd/storage/storage_file.c
+5
-0
storage_malloc.c
bin/varnishd/storage/storage_malloc.c
+5
-0
locks.h
include/tbl/locks.h
+0
-2
No files found.
bin/varnishd/storage/storage_file.c
View file @
50607488
...
...
@@ -63,6 +63,8 @@
*/
#define NBUCKET (128 / 4 + 1)
static
struct
VSC_C_lck
*
lck_smf
;
/*--------------------------------------------------------------------*/
VTAILQ_HEAD
(
smfhead
,
smf
);
...
...
@@ -420,6 +422,9 @@ smf_open(const struct stevedore *st)
off_t
fail
=
1
<<
30
;
/* XXX: where is OFF_T_MAX ? */
off_t
sum
=
0
;
ASSERT_CLI
();
if
(
lck_smf
==
NULL
)
lck_smf
=
Lck_CreateClass
(
"smf"
);
CAST_OBJ_NOTNULL
(
sc
,
st
->
priv
,
SMF_SC_MAGIC
);
sc
->
stats
=
VSM_Alloc
(
sizeof
*
sc
->
stats
,
VSC_CLASS
,
VSC_type_smf
,
st
->
ident
);
...
...
bin/varnishd/storage/storage_malloc.c
View file @
50607488
...
...
@@ -57,6 +57,8 @@ struct sma {
struct
sma_sc
*
sc
;
};
static
struct
VSC_C_lck
*
lck_sma
;
static
struct
storage
*
sma_alloc
(
const
struct
stevedore
*
st
,
size_t
size
)
{
...
...
@@ -235,6 +237,9 @@ sma_open(const struct stevedore *st)
{
struct
sma_sc
*
sma_sc
;
ASSERT_CLI
();
if
(
lck_sma
==
NULL
)
lck_sma
=
Lck_CreateClass
(
"sma"
);
CAST_OBJ_NOTNULL
(
sma_sc
,
st
->
priv
,
SMA_SC_MAGIC
);
Lck_New
(
&
sma_sc
->
sma_mtx
,
lck_sma
);
sma_sc
->
stats
=
VSM_Alloc
(
sizeof
*
sma_sc
->
stats
,
...
...
include/tbl/locks.h
View file @
50607488
...
...
@@ -40,8 +40,6 @@ LOCK(mempool)
LOCK
(
objhdr
)
LOCK
(
pipestat
)
LOCK
(
sess
)
LOCK
(
sma
)
LOCK
(
smf
)
LOCK
(
vbe
)
LOCK
(
vcapace
)
LOCK
(
vcl
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment