Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. centctrl.h
  5. Abstract:
  6. SIS Groveler central controller include file
  7. Authors:
  8. John Douceur, 1998
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. #ifndef _INC_CENTCTRL
  14. #define _INC_CENTCTRL
  15. class CentralController
  16. {
  17. public:
  18. CentralController(
  19. int num_partitions,
  20. Groveler *grovelers,
  21. GrovelStatus *groveler_statuses,
  22. ReadParameters *read_parameters,
  23. WriteParameters *write_parameters,
  24. ReadDiskInformation **read_disk_info,
  25. WriteDiskInformation **write_disk_info,
  26. int *num_excluded_paths,
  27. const _TCHAR ***excluded_paths);
  28. ~CentralController();
  29. bool any_grovelers_alive();
  30. void demarcate_foreground_batch(
  31. int partition_index);
  32. void command_full_volume_scan(
  33. int partition_index);
  34. static void control_groveling(
  35. void *context);
  36. static void exhort_groveling(
  37. void *context);
  38. private:
  39. double get_cpu_load();
  40. void grovel_partition(
  41. int partition_index);
  42. int num_partitions;
  43. int num_alive_partitions;
  44. Groveler *grovelers;
  45. PartitionController **part_controllers;
  46. IncidentFilter hash_match_ratio_filter;
  47. IncidentFilter compare_match_ratio_filter;
  48. IncidentFilter dequeue_hash_ratio_filter;
  49. double *hash_match_ratio;
  50. double *compare_match_ratio;
  51. double *dequeue_hash_ratio;
  52. bool cpu_load_determinable;
  53. HQUERY qhandle;
  54. HCOUNTER ctr_handle;
  55. int base_grovel_interval;
  56. int max_grovel_interval;
  57. int max_response_lag;
  58. int working_grovel_interval;
  59. int grovel_duration;
  60. unsigned int last_invokation_time;
  61. int foreground_partition_index;
  62. };
  63. #endif /* _INC_CENTCTRL */