From: "Stephen C. Tweedie" <sct@redhat.com>
To: Christoph Rohland <cr@sap.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Stephen Tweedie <sct@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
MM mailing list <linux-mm@kvack.org>
Subject: Re: [Patch] deadlock on write in tmpfs
Date: Tue, 1 May 2001 17:32:10 +0100 [thread overview]
Message-ID: <20010501173210.S26638@redhat.com> (raw)
In-Reply-To: <m3hez5ci6p.fsf@linux.local>; from cr@sap.com on Tue, May 01, 2001 at 03:39:47PM +0200
hi,
On Tue, May 01, 2001 at 03:39:47PM +0200, Christoph Rohland wrote:
>
> tmpfs deadlocks when writing into a file from a mapping of the same
> file.
>
> So I see two choices:
>
> 1) Do not serialise the whole of shmem_getpage_locked but protect
> critical pathes with the spinlock and do retries after sleeps
> 2) Add another semaphore to serialize shmem_getpage_locked and
> shmem_truncate
>
> I tried some time to get 1) done but the retry logic became way too
> complicated. So the attached patch implements 2)
>
> I still think it's ugly to add another semaphore, but it works.
If the locking is for a completely different reason, then a different
semaphore is quite appropriate. In this case you're trying to lock
the shm internal info structures, which is quite different from the
sort of inode locking which the VFS tries to do itself, so the new
semaphore appears quite clean --- and definitely needed.
--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2001-05-01 16:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-01 13:39 Christoph Rohland
2001-05-01 16:32 ` Stephen C. Tweedie [this message]
2001-05-02 12:00 ` Christoph Rohland
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=20010501173210.S26638@redhat.com \
--to=sct@redhat.com \
--cc=cr@sap.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.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