Re: [Gems-users] question about XACT_LOG_BUFFER_SIZE parameter


Date: Fri, 25 Apr 2008 23:04:52 -0700
From: cge@xxxxxxxx
Subject: Re: [Gems-users] question about XACT_LOG_BUFFER_SIZE parameter
I add beginEscapeAction in hardwareAbort.
Thanks for the advice.

Does XACT_LOG_BUFFER refer to a cache in the processor?
It will store the logs in the buffer cache without accessing memory when
writing logs as long as the log size is smaller than the buffer size.
Is my understanding correct?
If so, it will also improve the performance when logging by avoiding accessing memory.

By the way, are there any overheads by setting the buffer size too large ?

Thanks,
Cen

Quoting Jayaram Bobba <bobba@xxxxxxxxxxx>:

Ruben's approach seems better.
Add a beginEscapeAction() call in hardwareAbort()...

Jayaram Bobba wrote:
Simplest fix would be to replace

assert(m_escapeDepth[thread] >= 1)
with
if (m_escapeDepth[thread] < 1) return;

in TransactionInterfaceManager.C:335

Better fix would be to not implicitly end an escape action when using
hardware rollback (in restartTransactionCallback()).
We will try to fix it in the next release. Thanks for pointing it out.

Jayaram

cge@xxxxxxxx wrote:
Thank you for the response.

When I set it to 256.
I got the following exception:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simics-common: log_tm/TransactionInterfaceManager.C:335: void
TransactionInterfaceManager::endEscapeAction(int): Assertion
`m_escapeDepth[thread] >= 1' failed.
Abort (SIGABRT) in main thread
The simulation state has been corrupted. Simulation cannot continue.
Please restart Simics.
Starting command line. (May have skipped commands in script files.)
[cpu3] v:0x0000000000011814 p:0x0003cf95814  magic (sethi 0x801, %g0)
Setting new inspection cpu: cpu3
Traceback (most recent call last):
   File "../../../gen-scripts/mfacet.py", line 308, in
console_branch_internal
     wait_for_string(get_console(), __prompt)
   File
"/s/csls05/csl/virtutech/simics-3.0.22/x86-linux/lib/python/text_console_common.py",
line 10, in  wait_for_string
     wait_for_obj_hap("Xterm_Break_String", obj, break_id)
   File
"/s/csls05/csl/virtutech/simics-3.0.22/x86-linux/lib/python/cli_impl.py",
line  3371, in wait_for_obj_hap
     return wait_for_hap_common([hap_name, name, idx0])
   File
"/s/csls05/csl/virtutech/simics-3.0.22/x86-linux/lib/python/cli_impl.py",
line  3349, in wait_for_hap_common
     raise SimExc_Break, "Script branch interrupted"
sim_core.SimExc_Break: Script branch interrupted
Exception in python branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There is an assertion fail in end_escape_action.
It does not happen if I set the buffer size to be small like 0 or 16.

In ruby/simics/commands.C
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ((val == 0x122) && xact_mgr->shouldTrap(smt_thread_num)){
     // use software handler
     if (xact_mgr->shouldUseHardwareAbort(smt_thread_num)){
         xact_mgr->hardwareAbort(smt_thread_num);
     } else {
       xact_mgr->trapToHandler(smt_thread_num);
     }
   }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I think it is because setting the buffer size big enough will make
shouldUseHardwareAbort return true.
However, hardwareAbort does not call beginEscapeAction
while trapToHandler does.

Any comments how to correct it?

Thanks,
Cen

Quoting Jayaram Bobba <bobba@xxxxxxxxxxx>:


 From the wiki,
*
XACT_LOG_BUFFER_SIZE*: (>=0) The size of a magical hardware log buffer.
Used to perform 0-cycle restoration of memory values for any
transaction
having logs not exceeding this buffer size.

Basically, it allows zero-cycle aborts for small transactions.

You would need a bigger log buffer for transactions to be able to use
it. In LogTM-SE, each transaction starts
off by writing a transaction header which itself is 68 bytes. So you
would probably need something around 256 bytes
to be useful...

What kind of exception are you seeing when value is set to 1024?

Jayaram

cge@xxxxxxxx wrote:

Hi,

Does anyone know how can XACT_LOG_BUFFER_SIZE parameter enhance the
performance in
MESI_CMP_filter_directory protocol.
I tried to set the value to 16 or 32, and see no performance
difference in terms of cycles when running micro-program.

Also when I set the parameter to a large value like 1024, an exception
will be thrown. Is there an allowable maximum value?

Thanks,
Cen
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding
"site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.


_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding
"site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.





_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding
"site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.


_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.




[← Prev in Thread] Current Thread [Next in Thread→]