I take that back.
We really, really do not want to perform BIO splitting at all.
It requires that the kernel perform GFP_NOIO allocations at
the worst possible time, and it's just broken.
What I would much prefer is that the top-level BIO assembly
code be able to find out, beforehand, what the maximum
permissible BIO size is at the chosen offset. It can then
simple restrict the BIO to that size.
Simply:
max = bio_max_bytes(dev, block);
which gets passed down the exact path as the requests themselves.
Each layer does:
int foo_max_bytes(sector_t sector)
{
int my_maxbytes, his_maxbytes;
sector_t my_sector;
my_sector = my_translation(sector);
his_maxbytes = next_device(me)->max_bytes(my_sector);
my_maxbytes = whatever(my_sector);
return min(my_maxbytes, his_maxbytes);
}
and, at the bottom:
int ide_max_bytes(sector_t sector)
{
return 248 * 512;
}
BIO_MAX_SECTORS and request_queue.max_sectors go away.
Tell me why this won't work?
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/