Disclaimer

The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Friday, April 07, 2017

Blogging from ISCA: PESPMA: Erik Altmann, Exploiting Hidden Parallelism

Erik Altman, IBM. Bio: http://domino.watson.ibm.com/comm/research_people.nsf/pages/ealtman.index.html



Cores/chip 2x/generation. But not memory bandwidth.

=> even Adobe Photoshop, an obviously parallel app, will have problems on multicores with limited memory bandwidth.

...

Claim: to succeed general purpose products must implement all functions, including price, nearly as well as standalone appliances.

E.g. all in one printer / scanner / fax

E.g. cabling - USB

E.g. cameras vide/still - general purpose failure for now.

More examples: cooking, appliances, etc.

Successful computing appliances:
games, storage, routers

We can't rewrite all the software? But software doubles 0.6-6years.
Windows code doubling 866 days. Linux 2-3 year doubling.
BSD 6 year doubling.
Browsers doubled 216 days, early.

Altmann: software CAN be rewritten quickly, guiven reason.

Altmann shows a slde "Comparing Health", of how much code/dram is related to data, primitive bloat, tiny objects, glue, pointer bloat. Quote about DaCapo.

AFG: Altmann thinks this is bad. I think that it is inevitable, given different organizations and abstractions.

Oracle Parallelism: 11 studies. Hundreds of instructions of ILP.

Natural structure => parallelism:

while !ended
    task1
    ..
    taskN



where either task i is independent of task j, in same iteration,
or task i is independent between iterations.

E.g. gcc. Functions basically independent. Could parallelize gcc by function.

More oracle parallelism slides...

Parallelism > 5000: matmul, eqntott, fppp ...

500 - 5000 ...

50 - 500

< 50

Smoothability of parallelism onto finite hardware.

Lots of agreement that there exists parallelism.

Altmann proposes function fork after call SpMT (but does not use that name).
Says that old studies have too short a skip window.
Read/write set comparison.

Memory parallel regions.

AFG Q: do you have a good algorithm for computing memory parallel regions?

Example: 4K regions in Livermore Loops has too little independence, 64K regions almost 100% coverage.

Go - 4K window size bad, 64K 70%, 2M almost 90%

Stanford integer 4K windows better than larger windows.

Function ... at depth 3, no dependent loads in floowing 159,050 ins.

Example of where 2 high frequency cores makes more sense than 8 core low frequency.
8->2 => 60% freq gain for 2 core. 2core => more cache, etc.

Altmann shows slides that demonstrate that frequency has grown 2-3x faster than litho

Freq vs litho vs 1971: 78x, vs. 1978 3x

We may be overshooting, overemphasizing multicore.

conclusions

multicore != cmp

more appliances

ok to rewrite software

parallelism exists

tools

but freq still helps

multicore needs more than just finding concurrency


Questions:

Talks about using COW page tables to hold speculative state.

Erik's parallelism numbers were memory parallelism only. He was ignoring register dependencies. This naturally filters out function success/failure, typically returned in a register.

Sunday, April 02, 2017

MS Surface Book Notes

I am switching from my old Apple MacBook Retina Pro 15" to a new Microsoft Surface Book 4.

Why Switch?

  1. I love touchscreens.  MS has them all over, Apple does not.
  2. I need to be able to use my portable computer on plane. The MacBook cannot be opened fully, at least not on US domestic flights in economy. For that matter, neither can the SurfBook.  But at least I can convert the SurfBook to tablet mode, and use that.  Also, SurfBook in tablet mode plus a separate mini keyboard allows me to type on plane.
  3. Two of the things I use most often on laptop are Windows apps: [A] FrameMaker, [B] Outlook email.
    • running these as guest apps on Parallels VM on top of MacOS sucks, Parallels sucks. VirtualBox and VMWare suck, in slightly different ways.
  4. Company Exchange server can be accessed by native MacOS via many apps, but all suck.
    • Even "Microsoft Outloook for MacOS"sucks compared to "Microsoft Outlook for Windows".   e.g. less capable search, less capable conversation mode
    • I tried using MacOS mail apps for quick and dirty stuff, and full Outlook on Windows via Parallels when needed - but this sucks
    • I suspect - not 100% sure - that there are IMAP consistency issues
    • I know that email has been stick in VM guest for a week, beforce I noticed that VM guest was not connected to net, even though MacOS was.
    • Virtual machines are just another thing to have to administer.

Notes

The SurfBook hinge sucks.
  • I am worried it will break.
  • It prevents SurfBook folding as flat as possible.
  • I know that it does not open as far as I would like.
    • Stops circa 105°
    • While I often need it to open to circa 120°, to avoid glare.
    • Just learned that it has a first stop, and then you can push it a bit further, e.g. this post
    • See note above about worrying that the hinge will break.  The Reddit post that told me about the "hyper-extension" also has an item that says that 63% of Surface Book owners have broken their hinges.

Performance - feels slow

The SurfBook feels sluggish - at least doing web.stuff, like this blog or gmail, in the MS Edge browser.

Should not be: I have a high end SurfBook:
      Surface Book, 1TB / Intel Core i7-6600U @2.6GHz, 2.81GHz, 16GB DRAM, 1TB SSD

Compared to my old MacBook:
       Core i7, 2.8 GHz, 16GB 1600MHz DDR3, 1TB SSD

The MacBook definitely felt "perkier".

The SurfBook fan was on continuously for the first hour. Annoyingly loud.

Suboptimal Power Switch Position and Tent Mode

Here is how I place my SurfBook when at my treadmill desk:

  • Displays (several)
  • SurfBook
  • Keyboard tray, with trackball
It looks like I want the SurfBook between the displays and keyboard/trackball tray.

Tilted, so that I can use it as touchscreen.

Possibly tent mode.

Unfortunately:  to unlock the SurfBook, need either
  • ctl-alt-del
or
  • power switch + down arrow
Unfortunately, the power switch + down arrow are on the top edge of the SurfBook display in clamshell/laptop mode - which is the edge that it stands on in tent mode.

I suppose that I will have to try other configs, e.g. clamshell mode with screen reversed. Which is almost the same as tent mode, although requiring more depth.


Sunday, March 12, 2017

Trying out Fitocracy - nah...

"Trying out a fitocracy group for a group of friends from fitbit and work who want to challenge each othr with more than steps."


Today I wasted an hour or so trying out http://fitocracy.com



Drawn to fitocracy because it seemed to be site/app most focussed on a variety of workouts other than running/walking/steps/distance.



Fitocracy does have the ability to track exercises other than steps and distance. Supposedly more than 700 - "Most Popular 200" appears on your dashboard.  The exercises seem mostly gymrat weightlifting, generalized to things like walking, jiu-jitsu...  Or perhaps I should say "genericized" - the gymrat template of reps/sets is applied to most exercises.   Which can be a start, but is not always useful.  E.g. what does it mean to do "sets" of my 2 hour dog walk?   For which they allow me to record duration and distance, but not steps or vertical?



(One of the things that I would like to try challenges fr is vertical, eg as measured by fitbit's altimeter, inaccurate as it may be.)



The fitocracy website seems to be like facebook, cranked up and cranky on steroids. This is not a compliment.  The website is loud, in your face, obnoxious. The visual equivalent of loud music playing while you pump iron.  Looks like it would like to be a dating site, probably with as much or as little success as gymrats have picking up girls in the weight room.  (I know, I was such a gymrat once.)



The killer for me seems to be that fitocracy doesn't have "percentage of goal" challenges (as I describe in ISO social fitness challenges beyond steps, which allows friends of different levels to usefully challenge each other).



fitocracy doesn't even allow competitions on absolute, albeit self-recorded, metrics like pushups.



Instead, fitocracy seems to compare "points", calculated by an annoying "FRED  robot glyph". Supposedly allowing comparisons - but in what sort of dimensionally warped unreality I do not know.  (I don't like NIKE "fuel points" either.)



Coupled to this, indicators of poor quality:



I entered my first not-really-a-workout, just a simple record of a hike (where fitocracy would NOT allow me to record vertical).   Fitocracy seemed to insert this more than 7 times into my stream - perhaps once for every group that I had joined? Or, rather, once for each of the groups that I had bee automatically been added to, in addition to those I chose.



Fitocracy seems to take the "default in, optional opt-out" approach.   Indicates desperation to build society - but in my case, repels me.



Having created the group that I hoped to invite my friends to, I noticed a misspelling - "othr" rather than "other".  Part of that hour was wasted trying fruitlessly to find a way to edit the group description.

    Once again, an indicator of a website designed in a rush.



As far as I can tell, fitocracy does not have any automated synch facility.  So you would have to enter workouts by hand.  (If it has automated synch, it is lost in all the UI crap.)



---



BOTTOM LINE:



  • I like that fitocracy can handle typical gymrat workout items
  • But fitocracy doesn'do do %age of goal challenges
  • And so many other things about this site piss me off.
    • Not even going to bother with the iPhone app.
Overall, I have wasted too much time on fitocracy as is is.  Time better spent actually working out.


META-COMMENT:

I think that the difference between "challenge" and "competition" is an important indicator of mindset - whether of app, or the social milieu of an app or website.

"Competition" tends to imply absolute, who gets to be the winner.

"Challenge" tends to imply "we are all in this together".
















'via Blog this'

ISO social fitness challenges beyond fitbit

Some friends and I have been doing FitBit social fitness challenges for a while - I think more than a year now, possibly even two.

The social aspect has been effective, motivating us to do more than we were doing on our own.

We find the "Daily Goal" challenge most useful - what fraction of your daily goal did you get? -  since we have different levels of activity, ranging from circa 10K steps, to 15K+, to a treadmill desk user who usually gets 20K and often 30-40K steps.  Absolute step count challenges are boring when users are that different, but these relative "I got 150% of my goal :-)" vs "I only got 50% of my goal" are okay.

But - there's more to exercise than walking and counting steps.  Or even running and counting steps.

Some of us like swimming.  Others badminton.  Some aspire to do more weights, others yoga.   Calisthenics, pushups, squats, ...

So I am looking for social fitness platforms that have more variety.

Friday, March 10, 2017

Bundle (macOS) - Wikipedia

Bundle (macOS) - Wikipedia:



Many years ago (like, in the 1980s) folks at Gould and UIUC were wondering if we should extend Gould UNIX to support "structured files", like MacIntosh resource forks.



Way back then I said "No, UNIX already supports structured files: directories." With arbitrary metadata.



Similar, a newsgroup discussion on a similar topic - long enough ago that it waas net.* - Chris Torek was involved IIRC - it was pointed out that a tar archive is a structured file, equivalent to a directory.



This is well and good.



MacOS bundles are this concept, carried forward.  MacOS bundles are visible to ordinary UNIX apps as directories, but if you have the appropriate libraries they behave as structured files.



But if you don't have the right libraries, it is easy to damage such "bundles = structured files are directory trees". Tools like "find" traverse into them, etc.



Document formats such as Java JAR files and OpenDocument .odt/.odf files continue the "structured files are archives" meme. Using ZIP, in this case, because ZIP was commonly available on Windows PCs, even though zip does not support as much UNIX metadata the way tar files do.



It is harder to accidentally damage such a "structured files are archives" file. Standard UNIX tools don't look inside.



If you have a user level filesystem like FUSE, you can look inside the archive by mounting it, and use standard tools to manipulate it.



Heck - I wish that .git and .hg storage in repositories worked this way.



But archives are slower to manipulate that directory trees.



I want the best of both worlds - and better.



I want it to be transparent whether "structured file is directory tree" or "structured file is archive".



I want such a structured file to appear as a file (no internal structure) by default.



Possibly with a default data fork.



But I want it to be possible to "mount" such a structured file, whether directory tree or archive, so that standard tools can traverse.  Such a mount should not be global, but user, or better, context specific.  A la Plan9 namespace.



Special privilege should be required.  (No, not kernel, but not any user.)



This way we could distinguish between users and tools that just know how to copy or open the structured file "atomically", and those allowed to do more major surgery.









'via Blog this'

Friday, February 10, 2017

All your backups are about to be deleted... [Apple Time Machine]

Time Machine completed a verification of your b... | Official Apple Support Communities: "Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you."
'via Blog this'
This sucks.



Not so much because of the failure - things go bad, and Apple's Time Machine, which seems to be the moral equivalent of a hardlink farm for snapshots, as so many UNIX systems have, is an especially vulnerable format.



More because, AFAIK, there is no Apple Time Machine way to create a second backup or third backup.



Yeah, yeah, I know: the 3-2-1 Backup Rule, 3 copies, 2 formats, 1 off-site. Fortunately, in addition to Time Machine, I have also been using CrashPlan.



At least I am glad that Apple Time Machine / Time Capsule does verification passes, even if the recovery deletes all backups. Google finds many examples of "I thought that I was ll backed up using Time Machine, but when I tried to restore, the backup was reported to be corrupt." I hope that Crashplan does proper verification.  That's what we pay such companies to do.


Tuesday, February 07, 2017

Focus stealing makes me less efficient at work !!!

Krazy Glew's Blog: Monday, February 15, 2016: "I can't believe that focus stealing is still the state of the art.  It causes bugs.  Accidental corruption and destruction of data. And it can be a security hole."
Add to this, something I just realized: focus stealing makes me much less efficient at work, because it makes switching to another task dangerous.

I do a lot of work that involves running background jobs scripting otherwise interactive apps.  FrameMaker today.

I like being able to monitor the progress of such apps by leaving them open in a window on a different display, so that I can watch them out of the corner of my eye.

I would love to be able to do something else while these long running apps run - e.g. read email.  Unfortunately, if the app steals focus, then what I am typing into an email sometimes gets inserted into the app.  BAD!!!

So, for more than a year - I blogged about this in Feb 2016 - I have NOT been able to switch to my email program while these scripts run, for 5, 10, 15 minutes, sometimes more.

Worse:  some time before this, IT disabled VPN access from mobile devices. Unfortunately, the only iPhone email programs that I can stand using - Triage, to which I have recently added Sift - do not use ActiveSync, only IMAP.

So, basically, I have been crippled keeping up with company email for the last year or more.

I only realized this because IT recently gave me VPN access.  And all of a sudden I am keeping up with email again, reading it when the GUI focus stealing scripts are running.

---

I used to be able to blog while such apps were running - but haven't been able to do that with this focus stealing crap.  At least not using blogger - I don't thing the "Blog This" Chrome extension is available on my iPhone.

Ditto anything, like web browsing.  Pretty much I had to leave my MacBook idle except for the "should be background" app, because of frigging focus stealing.

---

Usable phone or tablet apps allow some such task overlap.   But I still find it darned hard to write anything more than a few words on those devices.

Perhaps if I had a second laptop, or a desktop I could switch to.

You might hope that a virtual machine might work - unfortunately, the way I have configured Parallels, "Coherent", means that Windows apps steal focus from MacOS apps, and vice versa.

---

Always scripting such apps to "open -g" is unsatisfactory.  I *want* the app to pop onto its screen - essentially a notification - but without stealing keyboard or mouse focus.

Oh for the old XWindows twm "click to focus" behavior.