Re: rm a_large_file takes too long under linux-2.2.1 (also unSTOPable)

Sang Kang (kernel@mocha.sarang.net)
Thu, 11 Feb 1999 04:52:53 -0800


On Wed, Feb 10, 1999 at 05:50:54PM -0600, Fuzzy Fox wrote:
> Sang Kang <kernel@mocha.sarang.net> wrote:
> >
> > I made a large file "dd if=/dev/zero of=blah count=1000000"
> > immediately followed by "rm blah". It took me about 20 second, and
> > I couldn't even send STOP signal to the process (^Z). Is this a new
> > feature or a side effect of a bugfix?
>
> It has always been this way, in my experience. In Linux, and other unix
> operating systems. It takes time to collect up all the indirect blocks
> and mark them free.
>
> You cannot STOP the process because it is not in an interruptible system
> call (unlink).
>
> Why do you believe this behavior is new?
>

For the removing speed issue, I remember there was a patch that can be applied
to 2.0.36 that speeds up a deletion process quite a bit (on Linuxmama I believe)
. I don't know if there was any discussion whether how safe it is, but I loved
the patch.

For the stopping issue, it has been my habit to suspend( = STOP) and do 'bg'
whenever I want to do something else immediately after issuing 'rm'. I don't
see why the foreground process 'rm' must be blocked since whenever an 'rm' is
issued, the kernel can simply launch a thread that removes the inodes - there
is no point of blocking the process.

IMHO,

Sang Kang

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/