Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3e4d05a1
Commit
3e4d05a1
authored
Dec 30, 2002
by
Justin T. Gibbs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use down_interruptable() rather than down() to avoid having the DV threads
counted toward the load average.
parent
a4d95569
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
12 deletions
+30
-12
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.c
+15
-6
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
+15
-6
No files found.
drivers/scsi/aic7xxx/aic79xx_osm.c
View file @
3e4d05a1
/*
/*
* Adaptec AIC79xx device driver for Linux.
* Adaptec AIC79xx device driver for Linux.
*
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#10
1
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#10
2
$
*
*
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs.
* Copyright (c) 1994-2000 Justin T. Gibbs.
...
@@ -2486,6 +2486,11 @@ ahd_linux_dv_thread(void *data)
...
@@ -2486,6 +2486,11 @@ ahd_linux_dv_thread(void *data)
printf
(
"In DV Thread
\n
"
);
printf
(
"In DV Thread
\n
"
);
#endif
#endif
/*
* Don't care about any signals.
*/
siginitsetinv
(
&
current
->
blocked
,
0
);
/*
/*
* Complete thread creation.
* Complete thread creation.
*/
*/
...
@@ -2495,7 +2500,11 @@ ahd_linux_dv_thread(void *data)
...
@@ -2495,7 +2500,11 @@ ahd_linux_dv_thread(void *data)
unlock_kernel
();
unlock_kernel
();
while
(
1
)
{
while
(
1
)
{
down
(
&
ahd
->
platform_data
->
dv_sem
);
/*
* Use down_interruptible() rather than down() to
* avoid inclusion in the load average.
*/
down_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
/* Check to see if we've been signaled to exit */
/* Check to see if we've been signaled to exit */
ahd_lock
(
ahd
,
&
s
);
ahd_lock
(
ahd
,
&
s
);
...
@@ -2518,7 +2527,7 @@ ahd_linux_dv_thread(void *data)
...
@@ -2518,7 +2527,7 @@ ahd_linux_dv_thread(void *data)
while
(
LIST_FIRST
(
&
ahd
->
pending_scbs
)
!=
NULL
)
{
while
(
LIST_FIRST
(
&
ahd
->
pending_scbs
)
!=
NULL
)
{
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_EMPTY
;
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_EMPTY
;
ahd_unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
down
(
&
ahd
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
ahd_lock
(
ahd
,
&
s
);
ahd_lock
(
ahd
,
&
s
);
}
}
...
@@ -2529,7 +2538,7 @@ ahd_linux_dv_thread(void *data)
...
@@ -2529,7 +2538,7 @@ ahd_linux_dv_thread(void *data)
while
(
AHD_DV_SIMQ_FROZEN
(
ahd
)
==
0
)
{
while
(
AHD_DV_SIMQ_FROZEN
(
ahd
)
==
0
)
{
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_RELEASE
;
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_RELEASE
;
ahd_unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
down
(
&
ahd
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
ahd_lock
(
ahd
,
&
s
);
ahd_lock
(
ahd
,
&
s
);
}
}
ahd_unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
...
@@ -2694,7 +2703,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
...
@@ -2694,7 +2703,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahd_unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
#endif
#endif
down
(
&
ahd
->
platform_data
->
dv_cmd_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_cmd_sem
);
/*
/*
* Wait for the SIMQ to be released so that DV is the
* Wait for the SIMQ to be released so that DV is the
* only reason the queue is frozen.
* only reason the queue is frozen.
...
@@ -2703,7 +2712,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
...
@@ -2703,7 +2712,7 @@ ahd_linux_dv_target(struct ahd_softc *ahd, u_int target_offset)
while
(
AHD_DV_SIMQ_FROZEN
(
ahd
)
==
0
)
{
while
(
AHD_DV_SIMQ_FROZEN
(
ahd
)
==
0
)
{
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_RELEASE
;
ahd
->
platform_data
->
flags
|=
AHD_DV_WAIT_SIMQ_RELEASE
;
ahd_unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
down
(
&
ahd
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahd
->
platform_data
->
dv_sem
);
ahd_lock
(
ahd
,
&
s
);
ahd_lock
(
ahd
,
&
s
);
}
}
ahd_unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.c
View file @
3e4d05a1
/*
/*
* Adaptec AIC7xxx device driver for Linux.
* Adaptec AIC7xxx device driver for Linux.
*
*
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#16
4
$
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#16
5
$
*
*
* Copyright (c) 1994 John Aycock
* Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science.
* The University of Calgary Department of Computer Science.
...
@@ -2338,6 +2338,11 @@ ahc_linux_dv_thread(void *data)
...
@@ -2338,6 +2338,11 @@ ahc_linux_dv_thread(void *data)
printf
(
"Launching DV Thread
\n
"
);
printf
(
"Launching DV Thread
\n
"
);
#endif
#endif
/*
* Don't care about any signals.
*/
siginitsetinv
(
&
current
->
blocked
,
0
);
/*
/*
* Complete thread creation.
* Complete thread creation.
*/
*/
...
@@ -2347,7 +2352,11 @@ ahc_linux_dv_thread(void *data)
...
@@ -2347,7 +2352,11 @@ ahc_linux_dv_thread(void *data)
unlock_kernel
();
unlock_kernel
();
while
(
1
)
{
while
(
1
)
{
down
(
&
ahc
->
platform_data
->
dv_sem
);
/*
* Use down_interruptible() rather than down() to
* avoid inclusion in the load average.
*/
down_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
/* Check to see if we've been signaled to exit */
/* Check to see if we've been signaled to exit */
ahc_lock
(
ahc
,
&
s
);
ahc_lock
(
ahc
,
&
s
);
...
@@ -2370,7 +2379,7 @@ ahc_linux_dv_thread(void *data)
...
@@ -2370,7 +2379,7 @@ ahc_linux_dv_thread(void *data)
while
(
LIST_FIRST
(
&
ahc
->
pending_scbs
)
!=
NULL
)
{
while
(
LIST_FIRST
(
&
ahc
->
pending_scbs
)
!=
NULL
)
{
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_EMPTY
;
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_EMPTY
;
ahc_unlock
(
ahc
,
&
s
);
ahc_unlock
(
ahc
,
&
s
);
down
(
&
ahc
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
ahc_lock
(
ahc
,
&
s
);
ahc_lock
(
ahc
,
&
s
);
}
}
...
@@ -2381,7 +2390,7 @@ ahc_linux_dv_thread(void *data)
...
@@ -2381,7 +2390,7 @@ ahc_linux_dv_thread(void *data)
while
(
AHC_DV_SIMQ_FROZEN
(
ahc
)
==
0
)
{
while
(
AHC_DV_SIMQ_FROZEN
(
ahc
)
==
0
)
{
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_RELEASE
;
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_RELEASE
;
ahc_unlock
(
ahc
,
&
s
);
ahc_unlock
(
ahc
,
&
s
);
down
(
&
ahc
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
ahc_lock
(
ahc
,
&
s
);
ahc_lock
(
ahc
,
&
s
);
}
}
ahc_unlock
(
ahc
,
&
s
);
ahc_unlock
(
ahc
,
&
s
);
...
@@ -2546,7 +2555,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
...
@@ -2546,7 +2555,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
ahc_unlock
(
ahc
,
&
s
);
ahc_unlock
(
ahc
,
&
s
);
#endif
#endif
down
(
&
ahc
->
platform_data
->
dv_cmd_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_cmd_sem
);
/*
/*
* Wait for the SIMQ to be released so that DV is the
* Wait for the SIMQ to be released so that DV is the
* only reason the queue is frozen.
* only reason the queue is frozen.
...
@@ -2555,7 +2564,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
...
@@ -2555,7 +2564,7 @@ ahc_linux_dv_target(struct ahc_softc *ahc, u_int target_offset)
while
(
AHC_DV_SIMQ_FROZEN
(
ahc
)
==
0
)
{
while
(
AHC_DV_SIMQ_FROZEN
(
ahc
)
==
0
)
{
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_RELEASE
;
ahc
->
platform_data
->
flags
|=
AHC_DV_WAIT_SIMQ_RELEASE
;
ahc_unlock
(
ahc
,
&
s
);
ahc_unlock
(
ahc
,
&
s
);
down
(
&
ahc
->
platform_data
->
dv_sem
);
down
_interruptible
(
&
ahc
->
platform_data
->
dv_sem
);
ahc_lock
(
ahc
,
&
s
);
ahc_lock
(
ahc
,
&
s
);
}
}
ahc_unlock
(
ahc
,
&
s
);
ahc_unlock
(
ahc
,
&
s
);
...
...
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