RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions

Joakim Nordström-2
This fix adds a check for coarsened region in mutex guarded section, when adding a reference to a remembered set.

Haven't been able to produce a testcase -- please advice on how to, or if not necessary.

**Testing:**
* hs-tier, hs-tier2

-------------

Commit messages:
 - Added check for coarsened region in mutex guarded section.

Changes: https://git.openjdk.java.net/jdk/pull/2545/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2545&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8242032
  Stats: 9 lines in 1 file changed: 9 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2545.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2545/head:pull/2545

PR: https://git.openjdk.java.net/jdk/pull/2545
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions [v2]

Joakim Nordström-2
> This fix adds a check for coarsened region in mutex guarded section, when adding a reference to a remembered set.
>
> Haven't been able to produce a testcase -- please advice on how to, or if not necessary.
>
> **Testing:**
> * hs-tier, hs-tier2

Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:

 - Clarified comment on re-checking coarsening
 - Minor typo

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2545/files
  - new: https://git.openjdk.java.net/jdk/pull/2545/files/7398c89b..4bc0f4b7

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2545&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2545&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2545.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2545/head:pull/2545

PR: https://git.openjdk.java.net/jdk/pull/2545
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions [v2]

Albert Mingkun Yang
On Fri, 19 Feb 2021 10:59:45 GMT, Joakim Nordström <[hidden email]> wrote:

>> This fix adds a check for coarsened region in mutex guarded section, when adding a reference to a remembered set.
>>
>> Haven't been able to produce a testcase -- please advice on how to, or if not necessary.
>>
>> **Testing:**
>> * hs-tier, hs-tier2
>
> Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:
>
>  - Clarified comment on re-checking coarsening
>  - Minor typo

Marked as reviewed by ayang (Author).

src/hotspot/share/gc/g1/heapRegionRemSet.cpp line 149:

> 147:     MutexLocker x(_m, Mutex::_no_safepoint_check_flag);
> 148:
> 149:     // Make sure region hasn't been coarsened by other thread.

Maybe mentioning this is an intentional re-check under lock, sth like, "Rechecking if the region is coarsened while holding the lock."

-------------

PR: https://git.openjdk.java.net/jdk/pull/2545
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions [v2]

Joakim Nordström-2
On Fri, 19 Feb 2021 10:38:35 GMT, Albert Mingkun Yang <[hidden email]> wrote:

>> Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:
>>
>>  - Clarified comment on re-checking coarsening
>>  - Minor typo
>
> src/hotspot/share/gc/g1/heapRegionRemSet.cpp line 149:
>
>> 147:     MutexLocker x(_m, Mutex::_no_safepoint_check_flag);
>> 148:
>> 149:     // Make sure region hasn't been coarsened by other thread.
>
> Maybe mentioning this is an intentional re-check under lock, sth like, "Rechecking if the region is coarsened while holding the lock."

Yes, thank you!

-------------

PR: https://git.openjdk.java.net/jdk/pull/2545
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions [v2]

Thomas Schatzl-4
In reply to this post by Joakim Nordström-2
On Fri, 19 Feb 2021 11:26:17 GMT, Joakim Nordström <[hidden email]> wrote:

>> This fix adds a check for coarsened region in mutex guarded section, when adding a reference to a remembered set.
>>
>> Haven't been able to produce a testcase -- please advice on how to, or if not necessary.
>>
>> **Testing:**
>> * hs-tier, hs-tier2
>
> Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:
>
>  - Clarified comment on re-checking coarsening
>  - Minor typo

Marked as reviewed by tschatzl (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/2545
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions [v2]

Joakim Nordström-2
In reply to this post by Albert Mingkun Yang
On Fri, 19 Feb 2021 10:38:48 GMT, Albert Mingkun Yang <[hidden email]> wrote:

>> Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:
>>
>>  - Clarified comment on re-checking coarsening
>>  - Minor typo
>
> Marked as reviewed by ayang (Author).

Thank you @albertnetymk and @tschatzl for review!

-------------

PR: https://git.openjdk.java.net/jdk/pull/2545
Reply | Threaded
Open this post in threaded view
|

Integrated: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions

Joakim Nordström-2
In reply to this post by Joakim Nordström-2
On Fri, 12 Feb 2021 13:01:52 GMT, Joakim Nordström <[hidden email]> wrote:

> This fix adds a check for coarsened region in mutex guarded section, when adding a reference to a remembered set.
>
> Haven't been able to produce a testcase -- please advice on how to, or if not necessary.
>
> **Testing:**
> * hs-tier, hs-tier2

This pull request has now been integrated.

Changeset: a6a7e439
Author:    Joakim Nordström <[hidden email]>
Committer: Thomas Schatzl <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/a6a7e439
Stats:     9 lines in 1 file changed: 9 ins; 0 del; 0 mod

8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions

Reviewed-by: ayang, tschatzl

-------------

PR: https://git.openjdk.java.net/jdk/pull/2545