LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 11-20-2012, 12:12 AM   #1
vishnunarayana
LQ Newbie
 
Registered: Nov 2012
Posts: 1

Rep: Reputation: Disabled
Cache invalidation


" Either flush or invalidate the cache lines corresponding to the buffer accessed by DMA and processor at strategic times "

What is the exact meaning of "invalidate the cache lines corresponding to the buffer accessed by DMA" in the above context.


Thanks,
vishnu
 
Old 11-20-2012, 12:26 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,203

Rep: Reputation: 229Reputation: 229Reputation: 229
Flush the cache by rewriting it down with zeroes. Invalidate it by preventing another write into the mapped memory or diverting its contents to null.

You are talking of kernel events; and I don't know exactly what you are doing. At least I made a try to put you up and gain attention from the better helpers around rather than leave your post to age without reply.

Hope that helps. Good luck.
 
Old 11-20-2012, 07:27 AM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,063

Rep: Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974
Actually, that's not quite right ... I think.

"The cache" refers to the on-chip cache lines that are part of the virtual-memory subsystem, used to avoid repeated reference to page and segment tables (which, of course, would triple the number of memory accesses and thereby bring the whole thing to a screeching plod). When you do something that affects segmentation, e.g. discarding stuff, changing page-table entries and so on, you must invalidate those parts of the CPU caches. (And all CPUs must do so.) There are established procedures and macros etc. for this. They must be followed precisely, so that your code is 100%-reliable on all processors, in actual conditions under heavy loads.

I don't momentarily recall if the CPU will attempt to cache content, but it would not surprise me. Suffice it to say that, anywhere a cache could be present, you must correctly advise the hardware when to invalidate it, and you must do so in the most specific (hence, least intrusive) way possible.

Last edited by sundialsvcs; 11-20-2012 at 07:31 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does slab coloring maximizes the use of Cache Lines or Cache Rows? pmehtal Linux - Kernel 6 10-16-2011 10:51 AM
LXer: Session Destroyer: Automatic Webapp Session Invalidation LXer Syndicated Linux News 0 12-31-2008 04:50 AM
openSUSE 10: Samba failed to create the cache directory in /var/cache mianmajidali Linux - Server 0 05-09-2008 02:00 AM
Error: Caching enabled and local cache: //var/cache/yum/base/primary.xml.gz does... dr_zayus69 Linux - Software 2 07-06-2005 04:32 AM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration