From: Phillip Susi <psusi-3tLf1voIkJTQT0dZR+AlfA@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Information regarding C3 cpu state and bus mastering activity
Date: Mon, 12 Dec 2005 11:08:01 -0500 [thread overview]
Message-ID: <439DA061.2060500@cfl.rr.com> (raw)
In-Reply-To: <439D716B.3010705-cGBD8117FJM@public.gmane.org>
Caching is never _completely_ hidden from the kernel. I am not as
familiar with the internals of the linux kernel as I am with NT, but I
imagine it would have to be similar. On NT drivers issuing hardware DMA
transfers must call functions in the HAL to facilitate the process. On
Intel platforms, the hardware generally maintains cache coherency across
multiple processors and bus masters, but this is not true on all
platforms. Many non Intel platforms' caches do not support bus snooping
( as indeed, there may not even BE a bus that is shared between all
processors and bus masters and memory modules ) so it is up to the HAL
functions to make sure the caches stay coherent by flushing the pages
being written to the device prior to the DMA starting, and invalidating
the pages being read after the DMA completes.
Seeing as how Linux is supported on an even wider range of even more
exotic systems ( think NUMA ), I have to believe that it has similar
features. Maybe it is just that the implementations of these support
functions on Intel platforms is defined to be a NOOP because it is
assumed that the hardware will always maintain coherency, but it seems
there is at least one time where this is not the case ( entering C3 ).
If this code is just disabled on Intel platforms, maybe it could be
reworked so that it maintains a list of all DMA transactions that are
currently in progress, then before entering C3, all the pages involved
in DMA writes would be flushed, and when exiting from C3, all the pages
involved in DMA reads would be invalidated.
It sounds like you were talking about flushing and invalidating the
ENTIRE cache when entering/exiting from C3. That would slow things down
quite a bit, but doing it only to the pages that are actually involved
in active DMA transfers should be fine.
Janosch Machowinski wrote:
>
> Normally a cache should be completely hidden from the system, so a
> driver can never determine the actually state of the cache. Only way to
> sync the cache is to completely flush it.
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
next prev parent reply other threads:[~2005-12-12 16:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-11 20:10 Information regarding C3 cpu state and bus mastering activity Marco Calviani
[not found] ` <da5cd1900512111210k626ff691x-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2005-12-12 0:33 ` Janosch Machowinski
[not found] ` <439CC549.5060500-cGBD8117FJM@public.gmane.org>
2005-12-12 3:42 ` Phillip Susi
[not found] ` <439CF197.3090902-3tLf1voIkJTQT0dZR+AlfA@public.gmane.org>
2005-12-12 12:47 ` Janosch Machowinski
[not found] ` <439D716B.3010705-cGBD8117FJM@public.gmane.org>
2005-12-12 16:08 ` Phillip Susi [this message]
2005-12-12 9:22 ` Marco Calviani
[not found] ` <da5cd1900512120122y217541a2h-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2005-12-12 12:51 ` Janosch Machowinski
[not found] ` <439D726E.4020704-cGBD8117FJM@public.gmane.org>
2005-12-12 16:02 ` Marco Calviani
2005-12-12 16:10 ` Marco Calviani
[not found] ` <da5cd1900512120810v75dd8721t-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2005-12-13 2:08 ` phutchis-CWA4WttNNZF54TAoqtyWWQ
[not found] ` <200512130208.jBD280VU003725-2ArO/UEyFsZWk0Htik3J/w@public.gmane.org>
2005-12-13 20:52 ` Marco Calviani
2005-12-13 14:06 ` Pavel Machek
[not found] ` <20051213140624.GA13694-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-12-14 11:58 ` Erik Slagter
2005-12-14 21:29 ` Marco Calviani
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=439DA061.2060500@cfl.rr.com \
--to=psusi-3tlf1voikjtqt0dzr+alfa@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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