Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
1972e1c6
Commit
1972e1c6
authored
Apr 23, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
writer thread returns free lists if its local list is larger than
half of the global total for the data type
parent
e59bc293
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
writer.c
src/writer.c
+7
-2
No files found.
src/writer.c
View file @
1972e1c6
...
@@ -99,7 +99,7 @@ typedef struct writer_data_s {
...
@@ -99,7 +99,7 @@ typedef struct writer_data_s {
static
writer_data_t
wrt_data
;
static
writer_data_t
wrt_data
;
static
unsigned
run
,
reopen
=
0
;
static
unsigned
run
,
reopen
=
0
,
tx_thresh
,
rec_thresh
,
chunk_thresh
;
static
int
static
int
set_fdset
(
void
)
set_fdset
(
void
)
...
@@ -239,7 +239,8 @@ wrt_write(tx_t *tx)
...
@@ -239,7 +239,8 @@ wrt_write(tx_t *tx)
DATA_Clear_Tx
(
tx
,
&
wrt_freetx
,
&
wrt_freerecs
,
&
wrt_freechunks
,
DATA_Clear_Tx
(
tx
,
&
wrt_freetx
,
&
wrt_freerecs
,
&
wrt_freechunks
,
&
wrt_nfree_tx
,
&
wrt_nfree_recs
,
&
wrt_nfree_chunks
);
&
wrt_nfree_tx
,
&
wrt_nfree_recs
,
&
wrt_nfree_chunks
);
if
(
RDR_Exhausted
())
if
(
RDR_Exhausted
()
||
wrt_nfree_tx
>
tx_thresh
||
wrt_nfree_recs
>
rec_thresh
||
wrt_nfree_chunks
>
chunk_thresh
)
wrt_return_freelist
();
wrt_return_freelist
();
}
}
...
@@ -332,6 +333,10 @@ WRT_Init(void)
...
@@ -332,6 +333,10 @@ WRT_Init(void)
timeout
=
&
to
;
timeout
=
&
to
;
}
}
tx_thresh
=
config
.
max_data
>>
1
;
rec_thresh
=
nrecords
>>
1
;
chunk_thresh
=
nchunks
>>
1
;
run
=
1
;
run
=
1
;
return
0
;
return
0
;
}
}
...
...
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