Re: [PATCH 0/4] ext3 block reservation patch set

From: Badari Pulavarty
Date: Wed Apr 14 2004 - 11:57:54 EST


On Tuesday 13 April 2004 07:47 pm, Andrew Morton wrote:

> - You're performing ext3_discard_reservation() in ext3_release_file().
> Note that the file may still have pending allocations at this stage: say,
> open a file, map it MAP_SHARED, dirty some pages which lie over file
> holes then close the file again.
>
> Later, the VM will come along and write those dirty pages into the
> file, at which point allocations need to be performed. But we have no
> reservation data and, later, we may have no inode->write_state at all.
>
> What will happen?

Block allocations happen after ext3_release_file() ? In that case,
we would have dropped all our reservations at the time of last file close.
But if allocations happen later, the current code will start new reservation
window and start allocations from there.

> - Have you tested and profiled this with a huge number of open files? At
> what stage do we get into search complexity problems?

Come to think of it, the current code has pretty bad search algorithm. We need
to fix that. We hold the spinlock for entire search, thats why our CPU
utilization is pretty high.

Thanks,
Badari
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/