Feed Advanced Search

Jul 25 2018

Ian Lynagh <ian@well-typed.com> committed rGHCDIFF15fe21091083: Test for #7815 (authored by fryguybob).
Test for #7815
Jul 25 2018, 9:57 AM
Ian Lynagh <ian@well-typed.com> committed rGHCDIFF87baa31cb117: Check to see if TVar's are locked in check_read_only (fixes #7815) (authored by fryguybob).
Check to see if TVar's are locked in check_read_only (fixes #7815)
Jul 25 2018, 8:00 AM

Jun 29 2018

fryguybob added a comment to D4905: Don't lock the MVar closure on tryReadMVar.

I should check and see what is the right thing to do with this and other MVar operations on a relaxed memory machine. It is possible that this change has some implications in that direction as tryReadMVar could be reordered differently with the new implementation.

Jun 29 2018, 2:13 PM

Jun 25 2018

fryguybob added inline comments to D4886: Don't allocate in atomicWriteIORef.
Jun 25 2018, 8:12 AM
fryguybob added inline comments to D4886: Don't allocate in atomicWriteIORef.
Jun 25 2018, 7:30 AM

Jun 22 2018

fryguybob added inline comments to D4884: Replace atomicModifyMutVar#.
Jun 22 2018, 9:20 PM

Oct 4 2017

fryguybob accepted D4067: rts/STM: Commit tx only if we can lock all affected invariants.

Looks good to me.

Oct 4 2017, 9:06 PM
fryguybob accepted D4065: [RFC] rts/STM: Ensure that invariants are unlocked if transaction commit fails.

Looks good to me.

Oct 4 2017, 9:06 PM
fryguybob requested changes to D4065: [RFC] rts/STM: Ensure that invariants are unlocked if transaction commit fails.
Oct 4 2017, 9:06 PM
fryguybob requested changes to D4067: rts/STM: Commit tx only if we can lock all affected invariants.
Oct 4 2017, 7:50 PM

May 11 2017

fryguybob added a comment to D3526: Implement unsafeInterleaveIO using MVars.
unsafeInterleaveIO m = do
  ref <- newIORef False
  m <- newEmptyMVar
  unsafeDupableInterleaveIO $ do
    r <- atomicModifyIORef' ref (\b -> return (True,b))
    if r then takeMVar m else do res <- m; putMVar m res; return res

Are we assured that multiple threads evaluating an unsafeInterleaveIO like defined above will see the same ref and m? Doesn't the allocation of these objects need to be protected by noDuplicate? I'm happy to be completely wrong, but I would like to know why.

The objects are allocated in the outer IO thread, so we can be guaranteed that they are executed exactly once for this call to unsafeInterleaveIO. Inside the unsafeDupableInterleaveIO we lose that guarantee and we have to implement mutual exclusion.

May 11 2017, 8:18 AM

May 5 2017

fryguybob created D3539: Remove false dependency on the destination of the popcnt instruction..
May 5 2017, 10:23 AM
fryguybob added a comment to D3526: Implement unsafeInterleaveIO using MVars.
unsafeInterleaveIO m = do
  ref <- newIORef False
  m <- newEmptyMVar
  unsafeDupableInterleaveIO $ do
    r <- atomicModifyIORef' ref (\b -> return (True,b))
    if r then takeMVar m else do res <- m; putMVar m res; return res
May 5 2017, 10:04 AM

May 3 2017

fryguybob added inline comments to D3526: Implement unsafeInterleaveIO using MVars.
May 3 2017, 9:41 AM

Nov 1 2016

fryguybob added a comment to D2654: Fix a bug in parallel GC synchronisation.

Looks good to me.

Nov 1 2016, 8:05 PM

May 6 2016

fryguybob added a comment to D800: Allow setting explicit thread affinity masks from a file..

@carter See the "Things that still need to be addressed:" part of the Summary. The file format that I'm reading here is rather ad hoc and aimed at being the simplest thing to do while reading it in C. I would hope for some better user facing interface such as command-line options for at least some common configurations while still allowing full mappings to be specified. I don't have much time at the moment to expand on those ideas and the patch as it is works for (and is quite critical for) my research.

May 6 2016, 8:40 PM

Nov 25 2015

fryguybob requested changes to D1523: Note STM's vulnerability to non-allocating loops.

The wording isn't quite right.

Nov 25 2015, 12:42 PM

Sep 2 2015

fryguybob added a comment to D1194: Fix trac #10413.

I was scratching my head a bit thinking about how to write a meaningful test. I think if the offset had changed before this fix, the sizeofSmallArray test would have caught it.

Sep 2 2015, 10:02 AM

Aug 31 2015

fryguybob retitled D1194: Fix trac #10413 from to Fix trac #10413.
Aug 31 2015, 6:08 PM

Aug 5 2015

fryguybob added a comment to D1127: users_guide: Add note about #367 to Bugs section.

I don't know of any trac tickets about this specifically. I should try to make a small case and add a new ticket. In my research I encounter this problem with a red-black tree where one thread commits a tree rotation while another has read part way through a rotated node in a search. It observes inconsistent linking and loops through that cycle forever. I don't remember if I have ever observed it with stock GHC, but it is certainly possible. It becomes more likely with my hybrid-TM where hardware transactions can commit faster while a fallback software transaction path is searching the tree.

Aug 5 2015, 10:20 AM
fryguybob added a comment to D1127: users_guide: Add note about #367 to Bugs section.

Sorry, I didn't notice this until now. I think there should be mention of STM specifically in addition to the general warning. STM without -fno-omit-yields can enter a non-allocating loop due to witnessing inconsistent data. This is a bit of a surprise to users as the point of using STM would be to avoid such inconsistencies.

Aug 5 2015, 8:40 AM

Apr 5 2015

fryguybob added a comment to D800: Allow setting explicit thread affinity masks from a file..

@simonmar Those are good suggestions. I initially considered just using the command-line, but for my use, 72 threads was a bit unwieldy. For lower thread count that will be convenient. Another format that can be useful in the middle is a hex bit mask especially if you want to choose multiple threads per capability. In my use, I'm always pinning each capability to exactly one thread.

Apr 5 2015, 2:31 PM

Apr 3 2015

fryguybob updated the diff for D800: Allow setting explicit thread affinity masks from a file..

Another attempt to fix warning.

Apr 3 2015, 9:19 PM
fryguybob updated the diff for D800: Allow setting explicit thread affinity masks from a file..

Fix build warning of unused set variable and wrong type for lines counter.

Apr 3 2015, 7:34 PM
fryguybob retitled D800: Allow setting explicit thread affinity masks from a file. from to Allow setting explicit thread affinity masks from a file..
Apr 3 2015, 12:22 PM

Jun 9 2014

fryguybob updated subscribers of D12: Make better use of the x86 addressing mode.
Jun 9 2014, 8:28 AM