<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thank you for the contribution!<br>
<br>
patch included in 'pu' for testing<br>
<br>
On 12/16/2011 11:13 AM, Jovi Zhang wrote:
<blockquote
cite="mid:CACV3sb+pOeqUOSSffX08ri1=2zrx7fup5vPr7n_f-g4K6c7mCQ@mail.gmail.com"
type="cite">
<pre wrap="">>From f8bb268d962808c6e64545afbbd0d2b0257afdb7 Mon Sep 17 00:00:00 2001
From: Jovi Zhang <a class="moz-txt-link-rfc2396E" href="mailto:bookjovi@gmail.com"><bookjovi@gmail.com></a>
Date: Fri, 9 Dec 2011 05:46:45 +0800
Subject: [PATCH] erts: reduce smp locking time range in erts_garbage_collect
get_now should be use out of process status locking, then
it can reduce smp locking time range in here.
---
erts/emulator/beam/erl_gc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index eb2b945..bcda3bf 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -357,10 +357,11 @@ erts_garbage_collect(Process* p, int need,
Eterm* objv, int nobj)
erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
p->gcstatus = p->status;
p->status = P_GARBING;
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
+
if (erts_system_monitor_long_gc != 0) {
get_now(&ms1, &s1, &us1);
}
- erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
ERTS_CHK_OFFHEAP(p);
--
1.7.2.3</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-patches mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-patches@erlang.org">erlang-patches@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-patches">http://erlang.org/mailman/listinfo/erlang-patches</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
/Henrik Nord Erlang/OTP</pre>
</body>
</html>