From: James Simmons <jsimmons@edgeglobal.com>
To: "Benjamin C.R. LaHaise" <blah@kvack.org>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Marcus Sundberg <erammsu@kieray1.p.y.ki.era.ericsson.se>,
linux-mm@kvack.org
Subject: Re: mm->mmap_sem
Date: Thu, 30 Sep 1999 10:59:02 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.10.9909300958100.3455-100000@imperial.edgeglobal.com> (raw)
In-Reply-To: <Pine.LNX.3.96.990929201805.6780A-100000@kanga.kvack.org>
> No, same problem. You can't put a process to sleep without
> inter-processor interrupts on smp if its not running currently.
So only putting the current process to sleep doesn't cost anything.
Putting another process to sleep does cost. I see this as being alot less
costly then the unmap the framebuffer and put the process to sleep on page
fault just before you access the accel engine solution. I though putting
another process to sleep would be easy. Just remove it from the run queue
and place it in the wait_queue. Mark the process as UNINTERUPPITABLE. Once
finished with the accel engine just remove it from the wait_queue and
place on the run_queue again. What am I missing?
Here is another question since its very expensive putting another process
to sleep. If the process owns both the accel engine and framebuffer then I
should be able to put the process to sleep while the accel engine is
running? Since the process is asleep it can't acces the framebuffer but
the accel engine is still running on the card.
Another question. Do the cards lock when you access any part of the
framebuffer and the accel engine or do the cards lock when you access
the a part of the framebuffer which at the same time is being modified by
the accel engine? If this is the case I was thinking about this possible
solution. You could have ioctl call to /dev/gfx where you would specify a
window in the framebuffer you want. That area of the framebuffer would be
removed from process address space owning the framebuffer and added to the
process address space that owns /dev/gfx. This way you could have a
application open /dev/gfx in X windows it would actually grab a piece of
the framebuffer for its self. The X server could not access this memory
region. Of course the X server would have to handle the seg fault
gracefully. The application could then write to the framebuffer directly.
Also the application could send accel commands to this region. Now since
both regions are controled by the same process we can put to sleep that
process until the accel engine is done.
> You can't
> allow the kernel to touch the frame buffer if the user is using the
> accelerator or vice-versa. Have an ioctl to lock the kernel out from
> updating, and only unlock it from user space when there's no activity for
> a while.
These are mmapped regions. So locking out the kernel will not help. You
have to prevent userland from accessing the memory region to prevent the
machine from locking.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-09-30 14:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-22 21:02 mm->mmap_sem James Simmons
1999-09-24 0:07 ` mm->mmap_sem Stephen C. Tweedie
1999-09-24 14:59 ` mm->mmap_sem James Simmons
1999-09-24 18:09 ` mm->mmap_sem Stephen C. Tweedie
1999-09-25 1:24 ` mm->mmap_sem James Simmons
1999-09-25 14:55 ` mm->mmap_sem Andrea Arcangeli
1999-09-25 16:50 ` mm->mmap_sem James Simmons
1999-09-25 17:06 ` mm->mmap_sem Andrea Arcangeli
1999-09-26 1:19 ` mm->mmap_sem James Simmons
1999-09-26 14:07 ` mm->mmap_sem Andrea Arcangeli
1999-09-27 8:55 ` mm->mmap_sem Marcus Sundberg
1999-09-27 19:31 ` mm->mmap_sem James Simmons
1999-09-29 23:00 ` mm->mmap_sem Stephen C. Tweedie
1999-09-30 0:17 ` mm->mmap_sem James Simmons
1999-09-30 0:23 ` mm->mmap_sem Benjamin C.R. LaHaise
1999-09-30 14:59 ` James Simmons [this message]
1999-09-30 15:15 ` mm->mmap_sem Benjamin C.R. LaHaise
1999-09-30 16:05 ` mm->mmap_sem James Simmons
1999-09-30 14:54 ` mm->mmap_sem Stephen C. Tweedie
1999-09-27 14:16 ` mm->mmap_sem Stephen C. Tweedie
1999-09-27 20:22 ` mm->mmap_sem James Simmons
1999-09-27 14:13 ` mm->mmap_sem Stephen C. Tweedie
1999-09-27 8:08 ` mm->mmap_sem Neil Conway
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=Pine.LNX.4.10.9909300958100.3455-100000@imperial.edgeglobal.com \
--to=jsimmons@edgeglobal.com \
--cc=blah@kvack.org \
--cc=erammsu@kieray1.p.y.ki.era.ericsson.se \
--cc=linux-mm@kvack.org \
--cc=sct@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