aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/s390mach.c
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2007-04-27 10:01:34 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-04-27 10:01:40 -0400
commit83b3370c79b91b9be3f6540c3c914e689134b45f (patch)
treead7c062b260c0259c74e45ff869208c1ad139629 /drivers/s390/s390mach.c
parent387b734fc2b55f776b192c7afdfd892ba42347d4 (diff)
[S390] cio: replace subchannel evaluation queue with bitmap
Use a bitmap for indicating which subchannels require evaluation instead of allocating memory for each evaluation request. This approach reduces memory consumption during recovery in case of massive evaluation request occurrence and removes the need for memory allocation failure handling. Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/s390mach.c')
-rw-r--r--drivers/s390/s390mach.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c
index afd8a3c0f8d6..644a06eba828 100644
--- a/drivers/s390/s390mach.c
+++ b/drivers/s390/s390mach.c
@@ -45,14 +45,13 @@ static int
45s390_collect_crw_info(void *param) 45s390_collect_crw_info(void *param)
46{ 46{
47 struct crw crw[2]; 47 struct crw crw[2];
48 int ccode, ret, slow; 48 int ccode;
49 struct semaphore *sem; 49 struct semaphore *sem;
50 unsigned int chain; 50 unsigned int chain;
51 51
52 sem = (struct semaphore *)param; 52 sem = (struct semaphore *)param;
53repeat: 53repeat:
54 down_interruptible(sem); 54 down_interruptible(sem);
55 slow = 0;
56 chain = 0; 55 chain = 0;
57 while (1) { 56 while (1) {
58 if (unlikely(chain > 1)) { 57 if (unlikely(chain > 1)) {
@@ -85,9 +84,8 @@ repeat:
85 /* Check for overflows. */ 84 /* Check for overflows. */
86 if (crw[chain].oflw) { 85 if (crw[chain].oflw) {
87 pr_debug("%s: crw overflow detected!\n", __FUNCTION__); 86 pr_debug("%s: crw overflow detected!\n", __FUNCTION__);
88 css_reiterate_subchannels(); 87 css_schedule_eval_all();
89 chain = 0; 88 chain = 0;
90 slow = 1;
91 continue; 89 continue;
92 } 90 }
93 switch (crw[chain].rsc) { 91 switch (crw[chain].rsc) {
@@ -95,10 +93,7 @@ repeat:
95 if (crw[0].chn && !chain) 93 if (crw[0].chn && !chain)
96 break; 94 break;
97 pr_debug("source is subchannel %04X\n", crw[0].rsid); 95 pr_debug("source is subchannel %04X\n", crw[0].rsid);
98 ret = css_process_crw (crw[0].rsid, 96 css_process_crw(crw[0].rsid, chain ? crw[1].rsid : 0);
99 chain ? crw[1].rsid : 0);
100 if (ret == -EAGAIN)
101 slow = 1;
102 break; 97 break;
103 case CRW_RSC_MONITOR: 98 case CRW_RSC_MONITOR:
104 pr_debug("source is monitoring facility\n"); 99 pr_debug("source is monitoring facility\n");
@@ -117,28 +112,23 @@ repeat:
117 } 112 }
118 switch (crw[0].erc) { 113 switch (crw[0].erc) {
119 case CRW_ERC_IPARM: /* Path has come. */ 114 case CRW_ERC_IPARM: /* Path has come. */
120 ret = chp_process_crw(crw[0].rsid, 1); 115 chp_process_crw(crw[0].rsid, 1);
121 break; 116 break;
122 case CRW_ERC_PERRI: /* Path has gone. */ 117 case CRW_ERC_PERRI: /* Path has gone. */
123 case CRW_ERC_PERRN: 118 case CRW_ERC_PERRN:
124 ret = chp_process_crw(crw[0].rsid, 0); 119 chp_process_crw(crw[0].rsid, 0);
125 break; 120 break;
126 default: 121 default:
127 pr_debug("Don't know how to handle erc=%x\n", 122 pr_debug("Don't know how to handle erc=%x\n",
128 crw[0].erc); 123 crw[0].erc);
129 ret = 0;
130 } 124 }
131 if (ret == -EAGAIN)
132 slow = 1;
133 break; 125 break;
134 case CRW_RSC_CONFIG: 126 case CRW_RSC_CONFIG:
135 pr_debug("source is configuration-alert facility\n"); 127 pr_debug("source is configuration-alert facility\n");
136 break; 128 break;
137 case CRW_RSC_CSS: 129 case CRW_RSC_CSS:
138 pr_debug("source is channel subsystem\n"); 130 pr_debug("source is channel subsystem\n");
139 ret = chsc_process_crw(); 131 chsc_process_crw();
140 if (ret == -EAGAIN)
141 slow = 1;
142 break; 132 break;
143 default: 133 default:
144 pr_debug("unknown source\n"); 134 pr_debug("unknown source\n");
@@ -147,8 +137,6 @@ repeat:
147 /* chain is always 0 or 1 here. */ 137 /* chain is always 0 or 1 here. */
148 chain = crw[chain].chn ? chain + 1 : 0; 138 chain = crw[chain].chn ? chain + 1 : 0;
149 } 139 }
150 if (slow)
151 queue_work(slow_path_wq, &slow_path_work);
152 goto repeat; 140 goto repeat;
153 return 0; 141 return 0;
154} 142}