1. 24 5月, 2010 2 次提交
    • K
      cfq-iosched: compact io_context radix_tree · 80b15c73
      Konstantin Khlebnikov 提交于
      Use small consequent indexes as radix tree keys instead of sparse cfqd address.
      
      This change will reduce radix tree depth from 11 (6 for 32-bit hosts)
      to 1 if host have <=64 disks under cfq control, or to 0 if there only one disk.
      So, this patch save 10*560 bytes for each process (5*296 for 32-bit hosts)
      
      For each cfqd allocate cic index from ida.
      To unlink dead cic from tree without cfqd access store index into ->key.
      (bit 0 -- dead mark, bits 1..30 -- index: ida produce id in range 0..2^31-1)
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      80b15c73
    • K
      cfq-iosched: remove dead_key from cfq_io_context · bca4b914
      Konstantin Khlebnikov 提交于
      Remove ->dead_key field from cfq_io_context to shrink its size to 128 bytes.
      (64 bytes for 32-bit hosts)
      
      Use lower bit in ->key as dead-mark, instead of moving key to separate field.
      After this for dead cfq_io_context we got cic->key != cfqd automatically.
      Thus, io_context's last-hit cache should work without changing.
      
      Now to check ->key for non-dead state compare it with cfqd,
      instead of checking ->key for non-null value as it was before.
      
      Plus remove obsolete race protection in cfq_cic_lookup.
      This race gone after v2.6.24-1728-g4ac845a2Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      bca4b914
  2. 22 5月, 2010 38 次提交