개정판 1d79913e
issue #00000 error notice mail 안 되는 문제 수정
Change-Id: I307236bdea2ca63347b99a174c02e1e53f05a3a7
ConvertService/ServiceBase/Markus.Service.Station/ServiceStation.cs | ||
---|---|---|
259 | 259 |
ProcessorAffinityList = new List<long>(); |
260 | 260 |
|
261 | 261 |
int processCount = Environment.ProcessorCount; |
262 |
int AffinityScope = 1;
|
|
262 |
int AffinityScope = processCount;
|
|
263 | 263 |
|
264 | 264 |
if (processCount > ServiceProperty.PROCESS_COUNT) |
265 | 265 |
{ |
266 | 266 |
AffinityScope = processCount / ServiceProperty.PROCESS_COUNT; |
267 | 267 |
} |
268 | 268 |
|
269 |
for (int i = 0; i < processCount - AffinityScope; i += AffinityScope) |
|
270 |
{ |
|
271 |
var bits = new int[processCount]; |
|
269 |
long affinityMask = 0; |
|
272 | 270 |
|
273 |
for (int j = i; j < i + AffinityScope; j++) |
|
271 |
while (ProcessorAffinityList.Count() < ServiceProperty.PROCESS_COUNT) |
|
272 |
{ |
|
273 |
if(affinityMask <= 1) |
|
274 | 274 |
{ |
275 |
bits[j] = 1; |
|
275 |
affinityMask = 1 << (processCount - 1); |
|
276 |
} |
|
277 |
else |
|
278 |
{ |
|
279 |
affinityMask = affinityMask >>1; |
|
276 | 280 |
} |
277 | 281 |
|
278 |
var affinity = System.Convert.ToInt64(string.Join("", bits), 2); |
|
279 |
|
|
280 |
ProcessorAffinityList.Add(affinity); |
|
282 |
ProcessorAffinityList.Add(affinityMask); |
|
281 | 283 |
} |
284 |
|
|
285 |
// for (int i = 0; i < AffinityScope; i += AffinityScope) |
|
286 |
// { |
|
287 |
// var bits = new int[processCount]; |
|
288 |
|
|
289 |
// for (int j = i; j < i + AffinityScope; j++) |
|
290 |
// { |
|
291 |
// bits[j] = 1; |
|
292 |
// } |
|
293 |
|
|
294 |
// var affinity = System.Convert.ToInt64(string.Join("", bits), 2); |
|
295 |
|
|
296 |
//#if DEBUG |
|
297 |
// List<int> test = bits.ToList(); |
|
298 |
// test.Reverse(); |
|
299 |
// System.Diagnostics.Debug.WriteLine($"index{string.Format("0#",i)} - {string.Join("", test)}"); |
|
300 |
//#endif |
|
301 |
// ProcessorAffinityList.Add(affinity); |
|
302 |
// } |
|
282 | 303 |
} |
283 | 304 |
|
284 | 305 |
public void StartService() |
내보내기 Unified diff