public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: duncan.sands@math.u-psud.fr, linux-kernel@vger.kernel.org,
	Al Viro <viro@redhat.com>
Subject: Re: xine pauses with recent (not -ac) kernels
Date: Sat, 13 Oct 2001 16:23:30 +0200	[thread overview]
Message-ID: <20011013162330.I714@athlon.random> (raw)
In-Reply-To: <01101208552800.00838@baldrick> <20011012161052.R714@athlon.random> <01101300085600.00832@baldrick> <200110130351.f9D3pRp08271@penguin.transmeta.com>
In-Reply-To: <200110130351.f9D3pRp08271@penguin.transmeta.com>; from torvalds@transmeta.com on Fri, Oct 12, 2001 at 08:51:27PM -0700

On Fri, Oct 12, 2001 at 08:51:27PM -0700, Linus Torvalds wrote:
> Let me guess: xine opens the raw device, and does all the DVD parsing
> from there. 
> 
> Furthermore, maybe it closes and re-opens the device for each VOB file. 

I was assuming it was a vm problem so I wasn't even thinking at the
other changes, but now thinking twice yes, the fact we block dropping
all the cache at the blkdev close could be the culprit. OTOH we were
just invalidating all the buffers cache also previously at the last
blkdev close, so it's not so obvious that it is the problem yet (but the
vmstat trace from Duncan also shows an immediate drop in pagecache
converted in free memory, so it could really be the close of the blkdev
given that xine isn't going to delete any dozen mbyte large file and
that probably doesn't allocate and deallocate some dozen mbyte of memory
in less than one second).

> If it does, then I suspect we should really look into making the raw
> device close just leave the device descriptor around at least for a
> while. Al?

In this case it sounds more like xine shouldn't close the device while
changing file (also with 2.4.9 the buffercache was dropped anyways), but
also allowing the cache to be persistent would make sense. I liked
trusting in the check-media-change logic for devices that are reliable
(for the others we must of course keep to invalidate the cache). I think
we should only make the bdev and bd_inode persistent, and have
check-media-change that tells us at open(2) time if the cache have to be
dropped or if we can trust the "media change" detection of the device
and avoid to drop it. Of course the cache will be reclaimed by the vm
over the time, I'm unsure if it worth to allow the garbage collection of
the bdev and of the bd_inode.

Anyways those changes aren't required for having a functional system so
maybe we can postpone this to 2.5 and instead fix xine not to close the
device (or to keep a dummy additional reference on the device for its
runtime).

Andrea

  reply	other threads:[~2001-10-13 14:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-12  6:55 xine pauses with recent (not -ac) kernels Duncan Sands
     [not found] ` <20011012161052.R714@athlon.random>
2001-10-12 22:08   ` Duncan Sands
2001-10-12 22:15     ` Andrea Arcangeli
2001-10-13 13:24       ` Duncan Sands
2001-10-13 14:10         ` Andrea Arcangeli
2001-10-13  3:51   ` Linus Torvalds
2001-10-13 14:23     ` Andrea Arcangeli [this message]
2001-10-13 19:58     ` Duncan Sands
  -- strict thread matches above, loose matches on Subject: below --
2001-10-13 19:39 Andrei Lahun
2001-10-13 20:40 Andrei Lahun
2001-10-14  4:31 Chris Rankin
2001-10-17 21:38 Guenter Bartsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011013162330.I714@athlon.random \
    --to=andrea@suse.de \
    --cc=duncan.sands@math.u-psud.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox