On Tue, Dec 19, 2000 at 12:16:03PM +0100, Holger Kiehl wrote:
> Does it also include the raid1 readbalance patch from Mika?

it seems raid code in 2.2.18aa2 does rebalancing during reads in raid1:

                /*
                 * read balancing logic:
                 */
                mirror = conf->mirrors + last_used;
                bh->b_rdev = mirror->dev;
                sectors = bh->b_size >> 9;

                if (bh->b_blocknr * sectors == conf->next_sect) {
                        conf->sect_count += sectors;
                        if (conf->sect_count >= mirror->sect_limit)
                                switch_disks = 1;
                } else
                        switch_disks = 1;
                conf->next_sect = (bh->b_blocknr + 1) * sectors;
                /*
                 * Do not switch disks if full resync is in progress ...
                 */
                if (switch_disks && !conf->resync_mirrors) {
                        conf->sect_count = 0;
                        last_used = conf->last_used = mirror->next;
                        /*
                         * Do not switch to write-only disks ...
                         * reconstruction is in progress
                         */
                        while (conf->mirrors[last_used].write_only)
                                conf->last_used = conf->mirrors[last_used].next;
                }
                bh_req = &r1_bh->bh_req;
                memcpy(bh_req, bh, sizeof(*bh));
                bh_req->b_end_io = raid1_end_request;
                bh_req->b_dev_id = r1_bh;
                map_and_make_request (rw, bh_req);
                return 0;

Of course you can't do rebalancing during writes.

Is Mika's patch more advanced than the above?

> And why is the 'shared' value of free or /proc/meminfo always 0. Under
> plain 2.2.18 this is not the case. I saw this under aa1 and aa2.

And you will see this under 2.4.0 too ;). It will avoid to lose clock ticks and
latency loss while reading /proc/meminfo if you have some good ram (starting
from 256M).  On a 9G alpha machine xosview rended the machine kind of unusable
due such evil O(N) loop ;).

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to