Shared memory and NUMA

Windows always does things differently to Linux, and this is almost always a problem, because Linux gets them right.

NUMA is the one exception I know of. Linux got it wrong, and Windows did it differently, and Windows did it right.

Linux has a system-wide policy which controls NUMA, and this is applied whenever a page is paged back in after being paged out. The upshot is you’ll get the system-wide NUMA policy, unless you pin your pages into memory so they can’t be paged. You youself in your application cannot control your NUMA behaviour. It’s controlled in the OS.

Windows does what you’d think would be done : when you make an allocation, you specify the NUMA node, and the OS tries as hard as it can to keep those pages in that node.

So this was all good and fine and clear until this week when I realised something.

I’ve been working on the test application for the position-independent data structures. They are intended for use with shared memory, where the shared memory has different virtual addresses in the difference processes; the data structures internally are using offsets rather than proper virtual memory addresses.

The new test application actually combines the test and the benchmark applications.

With the benchmarks, you want to be NUMA aware and take advantage of it. That means you need to pass in to the benchmark library a block of memory in each NUMA node, so it can put data in the correct places.

Now we see the problem – with shared memory, the data structure state, and all its elements, must be in the same single allocation.

How can you have one allocation per NUMA node *and* shared memory? because that means you have multiple allocations.

Suddenly Linux looks like it’s doing the right thing. Say you select striped allocations – your pages in any given allocation are striped over NUMA nodes. Okay, it’s not what you really want in your app – you want more fine grained control – but at least you’re able to *do* something meaningful with NUMA *within a single allocation*.

On Windows, where an allocation specifies its NUMA node, you just can’t do this.

You could in theory actually still make things work. In the data structure state, you’d have an array, which shows the address ranges for each allocation, and when you get hold of an offset (by popping an element from a freelist, say) you can then figure out *which* address range it is in, and so know the start of that range, and so figure out the actual virtual address represented by that offset.

Here though obviously you’re needing to do an array scan per freelist access, which is really not what you want.

Ironically, it’s on Windows where the position independent stuff really matters, because there are no locking primitives on Windows which are cross-process.


AirBnB continues its strenuous efforts to destroy any lingering friendliness, sense and ease of use in its web-site.

The latest dribble of madness : the property map is no longer shown by default. You have to actually click to turn it on.

The larger a company becomes, the worse its product and web-site becomes – and we’re not talking a bit worse, we’re talking dribbling wall-to-wall madness.

AirBnB – 30bn USD cap – it’s a property rental site *and now the property map is deactivated by default*.

Every single fucking web-site user has to click, and wait, to turn it on.

As a reminder, AirBnB have also changed their site so they will *only* bill you in the currency of the country your bank card is registered in : and if that currency is different to the currency of the booking, AirBnB apply a nice huge conversion charge to your bill for the service they forced you to use. You are no longer permitted to use your bank’s currency conversion.

For me, I have a multi-currency card, and I get billed for free, with no charges, in any currency I like.

But not with AirBnB.

Barclays Bank

I had to write.

So, I have an account with Barclays, a UK bank.

I’ve been with them a few months – I opened the account after wanting for a long time to get away from my previous bank, but not being in the UK, I couldn’t. Yay for banking regulation.

So Barclays are no good.

I’m going to move on – to do that, I need to update my address at Barclays so I can present a proof of address to the new bank.

So I go on-line to change my address.

Ohhhhh boy.

Pulling on a serious fuckin’ thread here.

So you can go on-line to an address page form.

It says – this change only works for on-line products. It does not work for your bank card. For your bank card, please call us – and “call us” is a link.

You follow it, it takes you to a page where you can have on-line chat.

So you use it.

Guy turns up pretty fast, that’s fine.

We talk.

Turns out the “call us” link takes you to the *unauthenticated* chat, and they can’t change your address.

What they can do is tell you to go and use the authenticated chat.

They need to tell you where it is on the site, to find it, because when you click on the *other* “contact us” link, it only offers phone and secure messaging.

Turns out the link for “make a complaint” is the link you need to follow to get to the authenticated chat customer support.

You couldn’t make it up.

I would let them know, but there’s no point. Zillions of people are letting them know, every day. Nothing changes, because if it did, it wouldn’t still be like this.

Royal Mail – just when you think it couldn’t be less useless, it is

I posted a package of birthday presents on the 9th June, to Switzerland.

ETA 3-5 working days.

Ten working days later, I check tracking.

According to tracking (which I do not trust) the package has not left the post office.

I try to contact the Royal Mail.

The only way offered is an 03457 number.

This costs me 1.2 euros a minute.

I found a complaints form – which has a “my complaint is not listed above” which seems to lead to a form which is for reporting missing packages!

I fill it in.

It has a Google fucking captcha.

After several minutes of intense frustration, it completes.

I hit submit.

The form fails to submit, on the basis that the Captcha has failed.

I now need to copy everything I’ve typed, reload the page, enter it all in again, and repeat the fucking Captcha, and I presume, try to get it to work quickly enough that the form does not time out.

Royal Mail -> absolutely fucking shit.


Having gone through it all again, I have discovered Captcha authentication ALWAYS fails.

I am rather coming to the view that *all* customer support forms, from larger companies, do not work.

The attempt to use them should not be made.

I will phone the fucking RM tomorrow, and never ever have anything to do with them ever again.

Fucking hell.

(Addendum. I tried calling their cusomter support number, from home, since they close at 1pm and there’s no time to get into the office. I was afraid to do so – the VOIP provider I use has a major failing, in that they cannot tell you the per minute rate of calls *before* you make them. If there was anothor viable Swiss provider, I’d use them. I tried an alternative 0845 number, and also the RM head office number which is also supposed to work, but no go. So I tried the 0345 number, having logged into the VOIP account so I could watch the call in the call history and see the price. Turns out the call is not shown until the call is complete; but is *does* change from having no header to the list, to having a header – so I thought the call might actually be being free. It wasn’t. It was 1.20 a minute, I was put on hold because there were busy, and after emptying the balance in the account (there wasn’t much there, which is why I was okay to risk it) the call disconnected. The VOIP provider is shit, and RM are shit. Well done guys, you’re fucking useless.)

Brexit #3

The UK two days ago passed a specific law forbidding the construction of border infrastructure on the NI/SI border.

(I thought this was already the case due to Good Friday!)

The EU has rejected the UK suggestion that the UK as a whole remain within the EU customs union and in ‘full alignment’ with the single market.

(This proposal has a couple of fundamental flaws. First, ‘full alignment’ is not ‘in the single market’. So the UK wants in, but also while being out. EU says – no cherry picking. Second, this is a UK-wide solution to an NI-specific problem – and this is because of UK internal politics. EU says – this is an NI problem, the solution must be NI specific. You cannot have a solution to this problem which abrogates the UK departure from the EU and in effect allows cherry picking, because of your internal political concerns.)

SI flatly refuses a hard border between NI and SI and the EU is backing them up. The UK has two options – either NI stays in the EU, or this is not done, and there is no deal.

In the event of no deal, the EU will erect a border – it has to do so, you can’t have an open border to another sovereign State – and the UK will not. This won’t last for long, and the border will return. (That the UK has a law blocking this means nothing : they can make another law.)

The Conservative Party and the DUP do not directly suffer from this. It is extraordinarily bad for the people of NI and SI.

In the event NI remains in the EU, the DUP will not vote with the Conservatives, Labour can then vote against Brexit, block Brexit, split the Conservative vote, and get into power.

Labour however is led by someone profoundly detatched from reality. He may not take the opportunity presented to him and his party.

UK really is in a bad spot. It can leave the EU, or quite possibly get a hard-left Labour government.

Brexit #2

The key issue in Brexit is the matter of the border between Northern and Southern Ireland.

According to the Good Friday agreement, there cannot be a hard border between Northern and Southern Ireland.

The UK, by leaving the EU, while Southern Ireland is in the EU, have obviously created a need for a hard border.

The problem is how to resolve this issue, because the UK can only secure an exit deal with the EU if all points in the deal are agreed. If even a single point is not agreed, a deal cannot be made, and the UK leaves with no-deal, which would be *profoundly* bad for the economy.

This matter is strongly affected by the political situation in the UK. There are two main parties, Labour and Conservative, left-wing and right-wing, respectively. The Conservative vote was split between the Conservatives and the UK Independence Party, and this seems to be why Cameron issued the referendum in the first place – to put the matter to rest and unify the right-wing vote. No one expected the referendum to lead to a ‘no’ vote.

The Labour party has not said much but has vaguely, in and on-again, off-again kind of way weakly-ish been in favour of Brexit. Labour will however I think change its tune and come to be firmly against Brexit for two reasons : firstly, most of their supporters are against Brexit, and secondly because it will split the Conservative vote and lead to Labour in power.

The Conservative Pary is a minority Government and depends on the ten votes of the Democratic Unionst Party, a Northern Irish party which seeks to keep Northern Ireland united with the UK.

The Unionist Party have made it clear that they require Northern Ireland to be treated in exactly the same way as the rest of the UK. No special treatment at all and in particular there cannot be a barrier or border of any kind between Northern Island and the UK.

If the Unionist Party stop voting with the Conservatives, the Conservatives will be a minority party, and so whether or not the Brexit bill passes will depend on Labour, and Labour will vote against it, to satisfy their voters and to split the Conservative vote, as this will lead to Labour in power in the next election.

The upshot of this then is that the UK needs to find a way to leave the EU, fully, but to maintain an open border with the EU.

There have so far and for some time and with heavy debate in the UK Government been two proposals presented by the UK Government. First is a technological solution, where there are no installations on the border but tracking and computer technology are used to have a kind of ‘virtual border’. The second is that the UK implements EU customs, at the UK border, for everything heading into the EU.

The huge debate in the UK Government about these options has been completely meaningless, as the EU made it clear it would never accept either solution. I presume the huge debate is a way of getting people to see neither solution is possible.

The real proposal from the UK has now come forward. It is being presented as a “backstop” option, should no other option be possible, either at all or for now. This is sugar coating.

The proposal is that the UK – and Northern Ireland – leave the EU and the single market, but remain inside the EU customs union. One way to think of it is as a fuller version of the UK implementing EU customs at the UK border. The idea is that as the UK (and Northern Ireland) remain within the customs union, no border is required between Northern Ireland and Southern Ireland.

If that doesn’t quite seem to add up, it’s because it doesn’t add up.

I would like to explain this in terms closer to the UK.

Imagine Kent (which includes the port of Dover) wished to leave the UK. The UK is obviously sad about this but okay – best of luck to you! Kent however then says it absolutely cannot have, for a number of reasons, have a border with the UK. Kent says to allow this to happen, so stuff can’t just wander into the UK by going through Kent which would obviously be a problem for the UK as a separate Soverign State, Kent will enforce UK border rules and regulations on its own border. The UK says well, that’s good and fine, but what about *you?* I understand you will stop stuff coming through your borders just as the UK does, but you Kent are a separate Soverign State and you can do what you like inside your own borders – and whatever you do in there can wander over our open border into the UK. How do you solve that, says the UK to Kent?

And that’s what this proposal is. Kent (the UK) wants to enforce EU border regulations between everything *outside* the UK and the EU, but *not* for everything *inside* the UK and the EU.

The EU have already made it clear that this solution – any solution – cannot extend to the whole of the UK. For them, the UK is leaving, and so there cannot be solutions specific to Northern Ireland which actually affect the entire status of the UK leaving the EU. The EU does not want “cherry picking”. States are either in, or out – the four indivisible freedoms. That’s the deal the EU offers.

The EU have proposed already, and will continue to propose, that Northern Ireland remains fully in the EU.

(Relating to this, David Davis, the Minister for Brexit, recently proposed Northern Ireland has a dual status, in the EU and the UK, and a ten mile gap between the UK and EU border (which I have to note contains the fourth largest city in Ireland). The proposal is utterly broken – you cannot be in two States at once; how do you have *two* courts of ultimate appeal, for example? and do you have all businesses adhere to two sets of regulations, and what do you do when they conflict? and anyway there is still a border – it’s just a border with a gap inbetween, and a large no-mans land is not going to change the fact that the Good Friday agreement has been violated. I’m surprised this proposal was ever even spoken of, because it’s so obviously not workable – presumably there was some other motive for presenting it.)

If the UK accepts this, the Unionist Party will stop voting with the Conservatives, Brexit will be blocked in Parliament, the Conservative vote will split, and Labour will come to power.

If the UK does not accept this, there will be no solution to the Northern Island border problem, the UK will leave the EU, the EU will put a border up, the UK in theory cannot due to the Good Friday agreement, and so anything can pass from the EU into the UK (the EU border enforces EU exit regulations, not UK entry regulations).

This will not stand, the UK will put a border up, and the Good Friday agreement will be violated. This is a serious issue for peace in Northern Ireland. There has been no devolved Government already in Nothern Ireland for sixteen months, due to trust issues between the parties forming the Government. So in this outcome Brexit is significantly increasing the likelihood of a return to violence in Northern Ireland. It is also profoundly harmful to the Irish economy, but Brexit as a whole is profoundly harmful to the UK economy, so it’s just more of the same.

I think also in this eventuality, a no-deal exit is more likely, as Southern Ireland is profoundly against a border as their long term goal is reunification, and they’re worried about the economic impact, and they need to agree to the UK-EU deal for it to occur.

An an aside, Labour coming to power will be catastrophic for the UK economy. Labour is currently extreme left-wing bonkers – nationalize everything, *maximum* wage caps, etc. It is a measure of just how bonkers they are that *despite* all these problems facing the Conservatives, the two parties are *still* level in the polls (although this is also because the Conservative vote is unified again right now0. It may also be of course that Labour simply mis-play their hand. That they *can* guarantee a win, if they make the right moves, does not mean they will make the right moves.


A no-deal exit will mean a hard border between Northern and Southern Island, which is absolutely unacceptable to everyone. It will mean a hard border because the EU will put a border there even if the UK does not : they cannot have an open border through which anything can come.

The and the only way to avoid a hard border is for Northern Island to remain in the EU.

This is utterly unacceptable – even more than a hard border – to the Democratic Unionist Party in Northern Island. They are a small party, ten MPs, who want Northern Island to be part of the UK. Where the Conservative Government in the UK is a minority Government, they currently give their ten votes to the Conservative Government, which by that has a majority.

They will not support a deal where Northern Island remains in the EU, so the Conservative Government will lose their majority when it comes to the vote on the exit deal.

This means then that the outcome will depend on how Labour votes.

Labour has entirely dodged the impossibilities of the EU problem by not having a hard opinion and not saying very much. They have been fairly vaguely supporting Brexit.

What will happen in fact is that Labour will vote against Brexit.

This will happen for two reasons.

Firstly, a large block of Labour voters are young, who are against Brexit. if Labour vote for Brexit, they alienate a large block of their supporters.

Secondly, the Brexit issue divides the Conservative Party – it led the anti-EU Conservatives to form the UK Independence Party, which split the Conservative vote. If the UK leaves the EU, it will unify the Conservative Party.

Labour are going to change their tune and end up being anti-Brexit, and they will vote against it, and their vote will lead to Brexit being blocked in Parliament.

This will revitalize the UK Independence Party, the Conservative vote will be split, and Labour will come to power.

The current Labour leadership are crazy-bonkers left-wing socialist, and they will once in power induce recession. Eventually the economy will be so badly off the Conservatives will be voted back in, and begin the long process of repairing the economy.

Moving to GitLab

GitHub has been bought by Microsoft.

I will be moving to GitLab.

I am looking to move in such a way that the only change to end-users is that the domain name changes.

Will see how that works out when I make the move.

Venting about EBay

Okay, so, to be clear, I hate Ebay.

I know I hate Ebay.

I’ve hated Ebay, intensely, for years – a decade now – because of bad experiences with the service.

So I don’t use it.

I am building my racing bike now and I’ve run into a serious problem with handlebars and shifters.

I really want to get hold of a Syntace Stratos handlebar – I had one ten years ago – but they’ve not been made for many years.

I Googled to see if any were available and hey – or rather, oh fuck – someone is selling one, new old stock, on Ebay.

I’ve just spent thirty fucking insane minutes of dribbling, wall-to-wall madness, trying to buy something on the Ebay site.

I failed of course. It was fucking insane of me to think I might succeed!

So, a listing on Ebay.

Listing says it ships to the UK.

I hit “buy now”.

I checkout as a guest, enter my shipping address and…

…run into the first fucking problem of the day.

“Seller has not specified any shipping information for the UK. We cannot ship to you. Try contacting the seller.”

So I go the seller page to send him a message.

This takes me to the “regsiter an account” page.

Register an account with Ebay?

Okay. I mean, “okay have my guts ripped out and hand them to Satan”, but okay.

I log into my email server, make a disposable email address, and go to register.

I enter the email address, and a password, and then hit submit.

Then I’m asking for an address and mobile phnne number.

Uh oh – if I give a mobile number, it’ll want to SMS me.

(I don’t actually keep *any* phone numbers. This is not permitted by Ebay.)

I try to enter an old US address of mine in NYC, but Ebay won’t recognize it.

I mean, I only lived there for a year, fine, whatever.

I pick some random address from the lists of addresses it suggested while I’ve half typed the address in – fine.

Turns out I can say I have only a land line. I do this, and I’m asked for a land line number.

I normally fake it with “111-222-3333” but Ebay won’t take it.

I go to the Ebay site to get *their* phone number.

Turns out their support site doesn’t work for me (go figure – upport not working – what a fucking surpise) so I can’t *get* the Ebay number.

I Google for “New York Circus phone number” and pick some random hotel in Las Vegas, which came up.

Okay so now I’ve registered and I can get to this guy to send him a message.

I go to his profile page, there’s some FAQ there from him, I look at shipping, doesn’t answer my questions, so I go to “contact seller”.

“This seller cannot take any questions.”



I can’t buy, and you just made my jump through hoops to register, and *then* you tell me I can’t message him.


So I go back to the purchase page.

You can send the seller a message there when you pay, something like that.

I enter my addresses again (five sets of addresses now entered, fucking fun, I just LOVE doing that) and enter the message THREE times in total (one originally, then two more times now because when you type *then* an “add” button comes up, which you have to click to keep the message – otherwise what you’ve typed it lost. Why not just keep it there, Ebay?)

So, finally – all addresses entered, message typed in, hit “commit to buy”.

This takes me to ANOTHER fucking page where I need to enter the message AGAIN.


I’m typing, fine. 500 character limit. Turns out when you hit the limit, the cursor jumps from where you were typing to the end of the message. Jesus fucking christ.

So I trim it down and hit submit.

“We’re sorry, but we can’t complete your request right now.”



I can’t contact Ebay, their support page for contacting them doesn’t work. I tried it earlier. (As an aside, you can also only get to that page if you’re registered. No support for people making guest purchases.)

So, I put it all down for a bit, take a step back.

I fire up a different browser and try the Ebay Support pages again – this time, I *can* get the number. Their site is browser sensitive, which is insane for something as simple as displaying a phone number. Lots of sites do that of course, but that’s why we all use Amazon – because the other web-sites all suck.

I phone Ebay.

I then spent 55 minutes on the phone with support.

I explain the problem.

First real response is this : we can’t contact the seller, because he has messages turned off, so best we can do is *help you find an alternative product*.

After I explain some more, I convey that it looks like Ebay is throwing an error when I try to buy and send a message.

In the course of the converation, I come to notice there is an error code on the error page – it’s in a small font, out of the way, in pale grey on a white background.

Fucking brain surgeons.

The error code is “80233”.

The very nice lady on support checks and says there is no information on that error.

During the conversation, the line goes a bit bad, so we decide to swap emails so we can stay in touch if we need to end the call. I ask her if there’s an email system built into Ebay, a messaging system. She says there is not, so she sends me an email, which arrives, so we can stay in touch after the call.

In fact, there *is* a messaging system built into EBay, it’s a fundmanetal part of the service. How on God’s clean Earth did she say no?

So anyways I reply to it – three times in total, twice from my normal email and once from Protonmail.

In all cases, the email arrives but she cannot open it.

In the end, she sends a message to the seller, explaining the situation.

I go to bed.

I missed the window of being tired, and I was worked up, annoyed and frustrated, and did *not* get to sleep. Stupid of me to tackle a problem like this late in the evening.

Next day, I Google some more on that error code.

From what people say, it’s an Ebay problem, to do with cross-country account use and cross-county purchasing, i.e. the Ebay system is fundamentally unable to work properly.

So I make an account (rather than, same idiot routine with the address not working, and then some trouble getting it to allow a manually entered address – NOTHING is easy) and try to buy and send a message.

“This seller has set buyer requirements for this item and will only sell to buyers who meet those requirements.”


Okay. Problem is I’m required to have a Paypal account linked to the EBay account.

I make a Paypal account (I hand my guts over to Satan, who decorates with them) and try again to buy and send a message – *and now it works*.

Seller and I then chat.

1. He received no message from Ebay
2. He is contacted by sellers about shipping information

We sort out shipping, and I paid today, with a burner virtual mastercard (who in their right mind would give Paypal any information) which will be deleted afterwards – more work and hassle, to deal with Paypal.

All in all, my original position about hating Ebay intensely is I believe supported and justified.

I would say they are Satan, but in my mind, Satan is quite competent and organized, and able to do things and be evil in an active and deliberate fashion. Ebay are just… 14,000 people who when put together are able to create the single most unpleasent web experience I have ever had.

If I could, I would exclude Ebay from all Google searches, so I never even *know* of what’s on the site.