Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
unique-xids
Commits
bd0246a0
Commit
bd0246a0
authored
Mar 19, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edge closer to the new worldorder
parent
20d561d9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
33 deletions
+17
-33
cache.h
bin/varnishd/cache/cache.h
+0
-15
cache_center.c
bin/varnishd/cache/cache_center.c
+3
-4
cache_expire.c
bin/varnishd/cache/cache_expire.c
+0
-1
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+3
-2
cache_hash.c
bin/varnishd/cache/cache_hash.c
+11
-11
No files found.
bin/varnishd/cache/cache.h
View file @
bd0246a0
...
...
@@ -1081,21 +1081,6 @@ Tadd(txt *t, const char *p, int l)
}
}
static
inline
void
AssertOCBusy
(
const
struct
objcore
*
oc
)
{
AN
(
oc
);
AN
(
oc
->
flags
&
OC_F_BUSY
);
AN
(
oc
->
busyobj
);
}
static
inline
void
AssertObjCorePassOrBusy
(
const
struct
objcore
*
oc
)
{
if
(
oc
!=
NULL
)
AN
(
oc
->
flags
&
OC_F_BUSY
);
}
/*
* We want to cache the most recent timestamp in wrk->lastused to avoid
* extra timestamps in cache_pool.c. Hide this detail with a macro
...
...
bin/varnishd/cache/cache_center.c
View file @
bd0246a0
...
...
@@ -215,7 +215,6 @@ cnt_prepresp(struct sess *sp, struct worker *wrk, struct req *req)
if
(
bo
!=
NULL
)
{
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
AN
(
bo
->
do_stream
);
AssertObjCorePassOrBusy
(
req
->
obj
->
objcore
);
}
req
->
res_mode
=
0
;
...
...
@@ -635,7 +634,6 @@ cnt_fetch(struct sess *sp, struct worker *wrk, struct req *req)
switch
(
req
->
handling
)
{
case
VCL_RET_DELIVER
:
AssertObjCorePassOrBusy
(
req
->
objcore
);
sp
->
step
=
STP_PREPFETCH
;
return
(
0
);
default:
...
...
@@ -875,8 +873,6 @@ cnt_prepfetch(struct sess *sp, struct worker *wrk, struct req *req)
RFC2616_Do_Cond
(
sp
))
bo
->
do_stream
=
0
;
AssertObjCorePassOrBusy
(
req
->
obj
->
objcore
);
sp
->
step
=
STP_FETCHBODY
;
return
(
0
);
}
...
...
@@ -1136,6 +1132,9 @@ cnt_lookup(struct sess *sp, struct worker *wrk, struct req *req)
return
(
0
);
}
/* We are not prepared to do streaming yet */
XXXAZ
(
req
->
busyobj
);
o
=
oc_getobj
(
&
wrk
->
stats
,
oc
);
CHECK_OBJ_NOTNULL
(
o
,
OBJECT_MAGIC
);
req
->
obj
=
o
;
...
...
bin/varnishd/cache/cache_expire.c
View file @
bd0246a0
...
...
@@ -224,7 +224,6 @@ EXP_Insert(struct object *o)
CHECK_OBJ_NOTNULL
(
o
,
OBJECT_MAGIC
);
oc
=
o
->
objcore
;
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
AssertOCBusy
(
oc
);
HSH_Ref
(
oc
);
assert
(
o
->
exp
.
entered
!=
0
&&
!
isnan
(
o
->
exp
.
entered
));
...
...
bin/varnishd/cache/cache_fetch.c
View file @
bd0246a0
...
...
@@ -40,6 +40,7 @@
#include "cache_backend.h"
#include "vcli_priv.h"
#include "vct.h"
#include "vmb.h"
#include "vtcp.h"
static
unsigned
fetchfrag
;
...
...
@@ -570,8 +571,6 @@ FetchBody(struct worker *wrk, void *priv)
if
(
bo
->
vfp
==
NULL
)
bo
->
vfp
=
&
vfp_nop
;
AssertObjCorePassOrBusy
(
obj
->
objcore
);
AZ
(
bo
->
vgz_rx
);
AZ
(
VTAILQ_FIRST
(
&
obj
->
store
));
...
...
@@ -681,6 +680,8 @@ FetchBody(struct worker *wrk, void *priv)
AN
(
obj
->
objcore
->
ban
);
AZ
(
obj
->
ws_o
->
overflow
);
HSH_Unbusy
(
&
wrk
->
stats
,
obj
->
objcore
);
obj
->
objcore
->
busyobj
=
NULL
;
VMB
();
}
/* XXX: Atomic assignment, needs volatile/membar ? */
...
...
bin/varnishd/cache/cache_hash.c
View file @
bd0246a0
...
...
@@ -551,9 +551,7 @@ HSH_Purge(const struct sess *sp, struct objhead *oh, double ttl, double grace)
/*---------------------------------------------------------------------
* Kill a busy object we don't need anyway.
* There may be sessions on the waiting list, so we cannot just blow
* it out of the water.
* Kill a busy object we don't need and can't use.
*/
void
...
...
@@ -563,13 +561,14 @@ HSH_Drop(struct worker *wrk, struct object **oo)
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
AN
(
oo
);
CHECK_OBJ_NOTNULL
(
*
oo
,
OBJECT_MAGIC
);
AssertObjCorePassOrBusy
((
*
oo
)
->
objcore
);
(
*
oo
)
->
exp
.
ttl
=
-
1
.;
if
((
*
oo
)
->
objcore
!=
NULL
)
/* Pass has no objcore */
HSH_Unbusy
(
&
wrk
->
stats
,
(
*
oo
)
->
objcore
);
(
void
)
HSH_Deref
(
&
wrk
->
stats
,
NULL
,
oo
);
AZ
(
HSH_Deref
(
&
wrk
->
stats
,
NULL
,
oo
));
}
/*---------------------------------------------------------------------
* Unbusy an objcore when the object is completely fetched.
*/
void
HSH_Unbusy
(
struct
dstat
*
ds
,
struct
objcore
*
oc
)
{
...
...
@@ -579,9 +578,8 @@ HSH_Unbusy(struct dstat *ds, struct objcore *oc)
oh
=
oc
->
objhead
;
CHECK_OBJ
(
oh
,
OBJHEAD_MAGIC
);
A
ssertOCBusy
(
oc
);
A
N
(
oc
->
flags
&
OC_F_BUSY
);
AN
(
oc
->
ban
);
assert
(
oc
->
refcnt
>
0
);
assert
(
oh
->
refcnt
>
0
);
/* XXX: pretouch neighbors on oh->objcs to prevent page-on under mtx */
...
...
@@ -591,13 +589,15 @@ HSH_Unbusy(struct dstat *ds, struct objcore *oc)
VTAILQ_REMOVE
(
&
oh
->
objcs
,
oc
,
list
);
VTAILQ_INSERT_HEAD
(
&
oh
->
objcs
,
oc
,
list
);
oc
->
flags
&=
~
OC_F_BUSY
;
oc
->
busyobj
=
NULL
;
if
(
oh
->
waitinglist
!=
NULL
)
hsh_rush
(
ds
,
oh
);
AN
(
oc
->
ban
);
Lck_Unlock
(
&
oh
->
mtx
);
}
/*---------------------------------------------------------------------
* Gain a reference on an objcore
*/
void
HSH_Ref
(
struct
objcore
*
oc
)
{
...
...
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