Ysabetwordsmith on a Certain Cinematic Universe

Thursday, 27 July 2017 08:57 pm
gingicat: the hands of Doctor Who #10, Martha Jones, and Jack Harkness clasped together with the caption "All for One" (all for one)
[personal profile] gingicat posting in [community profile] metaquotes
The characters I liked best? The bad guys. They were hard-working citizens who got screwed out of jobs that were legally contracted as theirs. So they decided to do something else, by selling alien equipment.

Context contains spoilers for a movie currently in theatres.

Friday, 28 July 2017 01:12 am
dancefloorlandmine: Me pointing at camera (Kitchener)
[personal profile] dancefloorlandmine
This is quite an interesting and convoluted tale ...

The Hijacking of the Brillante Virtuoso
jack: (Default)
[personal profile] jack
OK, so. We want to allocate a large block of memory that is contiguous as physical memory. That means allocating physical memory in the kernel (as with kmalloc), and then later providing it to userspace software. Presumably then mapping it into virtual memory for use in userspace with mmap from physical memory in dev/mem, although we may be doing something different for reasons which aren't relevant here.

We happen to have a kernel driver already for other experiments with our specific hardware, so we have somewhere convenient to put this kernel code as needed.

This is running on a hardware board dedicated to a single task, so we have a few advantages. We would prefer to allocate a large chunk on start-up, and will have complete control over which programs we expect to use it, we don't need to dynamically manage unknown different drivers trying to get this memory, and we never intend to free it, and the board will only be used for this so we don't need to make sure other programs run ok. And there's no restriction on addresses, DMA and other relevant peripherals can access the entire memory map, so unlike x86 we don't need to specifically reserve *low* memory.

There are several different related approaches, and I went through a few rabbit holes figuring out what worked.

Option 1: __memblock_alloc_base()

From research and helpful friends, I found some relevant instructions online. One was from "Linux Device Drivers, 3rd edition", the section entitled "Obtaining Large Buffers", about using alloc_bootmem_low to grab kernel pages during boot. I'm not sure, but I think, this was correct, but the kernel started using memblock instead of bootmem as a start-up allocator?

From the code in the contiguous memory allocator (search the kernel source for "cma"), I learned that possibly I should be using memblock functions as well. I didn't understand the different options, but I used the same one as in the contiguous memory allocator code, __memblock_alloc_base and it seemed to work. I tried large powers of 2 and could allocate half of physical memory in one go. I haven't fully tested this, but it seemed to work.

There are several related functions, and I don't know for sure what is correct, except that what the cma code did worked.

This code is currently in a kernel driver init function. The driver must be compiled statically into the kernel, you can't load it as a module later. You could put the code in architecture specific boot-up code instead.

Option 2: cma=

fanf found a link to some kernel patches which tried to make a systematic way of doing this, based on some early inconsistently-maintained patch, which later turned into code which was taken up by the kernel. Google for "contiguous memory allocator". There's an article about it from the time and some comments on the kernel commit.

It's a driver which can be configured to grab a large swath of contiguous memory at startup, and then hand that out to any other driver which needs it.

You specify the memory with "cma=64MB" or whatever size on the kernel command line. (Or possibly in the .config file via "make menuconf"?) You need to do this because it allocates on start-up, and it doesn't know if it should have this or not.

It then returns this memory to normal calls to "alloc_dma_coherent" which is designed to allocate memory which is physically contiguous, but doesn't normally allocate such big blocks. I hadn't tested this approach because I didn't need any specific part of memory so I'd been looking at kmalloc not "alloc_dma_coherent", but a colleague working on a related problem said it worked on their kernel.

It may also do clever things involving exposing the memory to normal allocating, but paging whatever else is there out to disk to free it up when needed, I'm not sure (?)

I was looking at the source code for this and borrowed the technique to allocate memory just for our driver. We may either go with that (since we don't need any further dynamic allocation, one chunk of memory is fine), or revert to using the cma later since it's already in the kernel.

I went down a blind alley because it looked like it wasn't enabled on my architecture. But I think that was because I screwed up "make menuconfig" not specifying the architecture, and actually it is. Look for instructions on cross-compiling it if you don't already have that incorporated in your build process.

Option 3: CONFIG_FORCE_MAX_ZONEORDER

This kernel parameter in .config apparently increases the amount of memory you can allocate with kmalloc (or dma_alloc_coherent?). We haven't explored this further because the other option seemed to work, and I had some difficulties with building .config, so I don't know quite how it works.

I found the name hard to remember at first. For the record, it means, ensure the largest size of zone which can be allocated is at least this order of magnitude (as a power of two). I believe it is actually 1 higher than the largest allowed value, double check the documentation if you're not sure.

Further options

There are several further approaches that are not really appropriate here, but may be useful under related circumstances.

* On many architectures, dma does scatter-gather specifically to read or write from non-contiguous memory so you shouldn't need this in the first place.

* Ensure the hardware can write to several non-contiguous addresses.

* Allocate the several blocks of the largest size kmalloc can allocate, and check that they do in fact turn out to be contiguous since kernel boot-up probably hasn't fragmented the majority of memory.

* Ditto, but just allocate one or several large blocks of virtual memory with malloc, and check that most of it turns out to be allocated from contiguous physical memory because that's what was available. This is a weird approach, but if you have to do it in userspace entirely, it's the only option you could take.

[TV] IN WHICH I HAVE FEELINGS.

Thursday, 27 July 2017 06:16 pm
kaberett: Clyde the tortoise from Elementary, crawling across a map, with a red tape cross on his back. (elementary-emergency-clyde)
[personal profile] kaberett
Feelings the first: I've just had A finish Season 1 of Korra, and I'm going to be making him watch Spirited Away before Season 2, because that sequence is frankly one of the few things I like about Season 2, so. BUT. Having very recently watched the end of Book 3 of A:tLA with him, I Noticed a Thing about the end of Season 1 that I had not, previously, and then FEELINGS. Spoilers, obviously. )



Orphan Black is also a bunch of FEELINGS, also has spoilers (up to 5.07), and also comes with a content note for Significant Gore slightly beyond what one normally expects of the show, along with all the usual "everything is horrifying but I love all of them" caveats.

Read more... )

Sharing photos

Thursday, 27 July 2017 04:36 pm
ghoti_mhic_uait: (Default)
[personal profile] ghoti_mhic_uait
One of the things I've been doing recently is learning photography. I'm getting the hang of a proper camera, and taking a lot of photos and hopefully improving. I've taken a couple of photos I'm really pleased with, and want to share further. Where's a good place for that?

This is what I've thought of: Facebook, but then Colin can't see. Tumblr, but I basically only use tumblr from my phone and that's a bit tricky. Just putting them on public galleries on Google, but I find the permissions hard to get right. Instagram, which seems to be a place for editing photos rather than showing off raw photos?

Any other ideas I didn't think of yet? Or is there a reason I'm just wrong about one of those?

Music meme: day 17 of 30

Thursday, 27 July 2017 03:46 pm
liv: oil painting of seated nude with her back to the viewer (body)
[personal profile] liv
A song that you would sing as a duet on karaoke. I don't do karaoke, and I don't do duets, so this is a bit of a non-starter for me.

No, let me explain, because I'm having fun answering this meme in way too much detail. I think karaoke is an absolutely excellent idea in theory. It's really great to encourage people to sing just for fun and not worry about skill level. And it's really great to use technology to play the backing music and display the lyrics so that someone can just get up and sing the melody with little preparation.

The problem is that for me personally, karaoke means packaging up 30 plus years of abject humiliation over not being able to sing in tune, and asking me to enjoy that in public. I find it hard anyway to make myself sing in front of other people; I do it, because I absolutely do believe that music belongs to everybody (not just people who are "musical"), and shared music is a great way for people to connect. Singing in front of an audience who are paying attention to me, or even worse, in a competition, however light-hearted, is too terrifying.

Duets are possibly extra impossible, because singing in unison with someone else is already hard for me. Especially if they have a lower range; I can't really hear octaves, so I find it very difficult to join in with someone singing in the bass clef range. Singing in harmony is really really hard, because not only do I have to sing the correct notes which I always find difficult to remember, I also have to match the note which is very imperfectly in my head while being distracted by my partner singing a different note that my actual ears can hear. I can sometimes do multi-part harmony if there are several people singing each section, so I can listen to someone else who is singing the same line as me. And I'm fine with parts in music in general when I don't have to worry about pitch. But a sung duet is really tricky.

And really, I can think of very few duets that I know at all, for whatever reason, even to listen to. Let's call the whole thing off might work, because (at least in this superlatively great version with Ella Fitzgerald and Louis Armstrong) it's mostly alternating verses or lines between the two singers rather than harmony. But hypothetically, if I were to find the courage to sing karaoke, I probably wouldn't start with something really amazingly great; somehow I'd feel less bad about murdering some ephemeral extruded pop product than attempting an actually good song.

I will admit, though, that my brother and I have been known to sing Always by Bon Jovi, as a sort of duet, sometimes in public and definitely not caring that neither of us can really sing. Partly because we always liked the dubious rhyme of:
I'll be there til the stars don't shine
Til the heavens burst, and the words don't rhyme
And partly because Bon Jovi can't really sing either, he just projected a persona calculated to appeal to teenaged girls in the 90s. So I probably wouldn't sing it actually in karaoke, and I probably wouldn't sing it with anyone other than my brother, but it seems slightly less impossible than any other options, so I think it seems in the spirit of the meme.

video embed )

Just One Thing (27 July 2017)

Thursday, 27 July 2017 08:05 am
nanila: YAY (me: abby)
[personal profile] nanila posting in [community profile] awesomeers
It's challenge time!

Comment with Just One Thing you've accomplished in the last 24 hours or so. It doesn't have to be a hard thing, or even a thing that you think is particularly awesome. Just a thing that you did.

Feel free to share more than one thing if you're feeling particularly accomplished!

Extra credit: find someone in the comments and give them props for what they achieved!

Nothing is too big, too small, too strange or too cryptic. And in case you'd rather do this in private, anonymous comments are screened. I will only unscreen if you ask me to.

Go!

Wednesday, 26 July 2017 11:52 pm
fluffymormegil: @ (Default)
[personal profile] fluffymormegil

Petty annoyance: Tesco sells store-branded swing bins in two sizes - 25L and 50L.

They only sell store-branded swing bin liners in one size - 50L.

So much for planning

Wednesday, 26 July 2017 08:49 pm
rmc28: Rachel smiling against background of trees, with newly-cut short hair (Default)
[personal profile] rmc28
The first week of school holidays; a big to-do list to get done at both home and work before Helsinki; in particular a big code push early on Tuesday morning.  I had a whole carefully worked-out schedule of when Tony and I would be at work and on leave and working from home and doing childcare runs.

Early on Monday morning, I woke up very suddenly and proceeded to have a very thorough stomach upset for much of the day.  My boss is the best boss, for taking over and sorting out my Tuesday work for me.  I had to reorganise the cleaner, and my routine bone marrow appointment due today (because taking a potential stomach bug into a ward of cancer patients is distinctly antisocial) and completely redo the who-is-home-when plan for the week.

But I was at least able to work today, and (fingers-crossed) I'll be back in the office tomorrow.

The most exciting thing this week has at least gone to plan so far.  My dad made a flying visit today to collect Nicholas for a long weekend at WOMAD. His first time away from home without a parent in tow; not his first time away from both parents though, and it should be a lot of fun for them both.  I look forward to hearing all about it on Monday.

Brainweasels

Wednesday, 26 July 2017 07:22 pm
hollymath: (Default)
[personal profile] hollymath
Acting like a stereotypical depressed person today. Still in my pajamas, spent way too much time on twitter, only eaten pizza and chocolate today. Strangely, none of that's helped!

But in the last hour or so I walked the dog, did the smallest bit of tidying, talked to Andrew about some of the stuff that's bugging me. So this evening has been slightly better than today.

(I also found that gmail is a dick: a scary e-mail I thought I sent a whole week ago (saying "I cannot continue volunteering with this thing any more because it's too stressful I need to concentrate on looking for paid work" (well, they're both true...)) didn't fucking send so I've sent it now but have to stress again for a while about every new e-mail I get. Because yay, anxiety making me avoid confrontation.)

Wednesday, 26 July 2017 01:28 pm
naath: (Default)
[personal profile] naath
18.A song from the year you were born

I had to look this up...

https://www.youtube.com/watch?v=XfR9iY5y94s

(Men at work - down under)

More about the World Cup final

Wednesday, 26 July 2017 01:05 pm
hollymath: (Default)
[personal profile] hollymath

[personal profile] miss_s_b shared this article yesterday and there's a lot in it I agree with.
So how come this win the game-changer, given this is actually the fourth time England have won the World Cup? I think for starters you have to look at the build-up towards the final. Sky Sports, in partnership with the ICC, provided full coverage of the tournament for the first time. By giving the games that platform it lent the series momentum and the opportunity for people to watch women’s sports who otherwise might not have. By promoting it in the same level as the men’s, it gave the impression that this is something sports fans should be watching.
This reminded me of one point in the afternoon where I heard Jennie's dad address whichever England batters were currently on the field with something like "come on, play as well as you did the last time I saw you two" and I asked him what he'd seen them in. "Oh, I don't remember, I've watched dozens of matches the past few weeks." Made me smile. This is what you want by the time you get to the World Cup final, some familiarity with the players and teams.

Of course it's a mixed blessing, with Andy also calling Sky" the greatest reducer of sporting audiences in the world." I was frustrated that as a TV-less, Sky-less person it wasn't easy to follow the games on the radio. One of my friends told me how Sri Lanka had done before we went to see them (the game where Athapaththu got 178 against Australia) but I would otherwise have to be a more internet/app-based follower of cricket to know these things, which I think is a shame. I wonder if we'll hear men's World Cup games that don't involve England on the radio in two years; I honestly don't know if this is something specific to the women's game or not. Still I'm glad the tournament got the attention it did, even if it had to be from Sky.
I heard one person exclaim “but the tickets were all bought by women”, as if that undermined the event?

In reality, 50% of ticket buyers were female. 50%. A gender diverse audience.
I first noticed this when I needed to pee. I don't think I'd ever had to wait in line at a cricket match before! Indeed one time, I think it was at Headingley but it might've been Old Trafford, when I asked a staff member where the loos were he could only direct me to the men's when the women's were off in another direction, indicating how rarely he was asked this question perhaps. This time, one woman sitting in our row came back late from the interval between innings, apologizing as she made us stand up, but defensively saying "Forty-five minute queue for the loos!" It wasn't that bad for me, but it was the first time I'd noticed how many women were really there.

I didn't hear any comments like "all the tickets were bought by women," thankfully but I do think this is interesting. There's that Geena Davis Institute statistic about a group of 17% women, men think is gender balanced and if it's 33% women, men think there are more women in the room than men.
with 31% of ticket buyers being under 16, and many more of the crowd full of children, it felt incredibly special to see girls and boys dressed in their team’s colours watching women ignite a packed-out stadium. For them, it will now be something they have grown up with, and will become normal to them, and that is something that excites them beyond belief. They will have female role models to look up to and inspire them. And how did they finish their day? Walking out with a bat and ball provided to them, ensuing that they have equipment to play with and as a souvenir to remember this day.
It was really great seeing how very many bats and balls I saw people carrying as we walked out and then waited at the tube station.

And I'm so glad they were given bats and balls, rather than anything else. When I was a kid I went to the Twins game where Kent Hrbek's number was retired, and all the kids were given replica jerseys. I adored him and I was so excited about this, but my mom put jersey away so it'd stay nice, never let me wear it and of course soon I'd have outgrown it anyway and the chance to really enjoy it was gone. It's probably still in a box at my parents' house somewhere, but I haven't seen it since the day I got it. Maybe some similarly well-meaning parents will squirrel away these too, but I'm really glad the kids have been given something so obviously useful and intended to be used. They have stuff they can actually play cricket with, and for people who love the game there's nothing better to guarantee a good future for it.

I am really envious of those kids, growing up thinking it's normal to watch women play cricket.
what also excited me was the members and groups of guys turning up to watch the cricket and enjoy the day, just like they would do any other game. There was no difference. No undermining the game, no undeserving criticism of the players, and it was beyond refreshing.
I noticed this too. I found myself bracing, early on, for some kind of sexism or misogyny in their comments, but I didn't hear a peep. I mean, I'm not saying they didn't happen anywhere in the ground, but I didn't expect any of us to be free of hearing them and I at least was.

Music meme: day 16 of 30

Wednesday, 26 July 2017 10:39 am
liv: alternating calligraphed and modern letters (letters)
[personal profile] liv
Let's get the political complaining off the top of my journal, and talk about One of your favourite classical songs.

Because I always end up picking Fauré's Requiem every time I answer a meme about music, I'll stick to a strict definition of 'song' and go with Les roses d'Ispahan instead:

video (singing over animation of the score) )

The story behind this is that I fell in love with Fauré when I heard the school choir singing the Requiem when I was 12, and the singing teacher saw me falling in love and decided to try to teach me to sing, even though I notoriously couldn't hold a tune. And we talked a lot about singing Christian sacred music, but she also pointed out that Fauré wrote plenty of secular stuff, so I could learn that. Alongside lots of simpler things more appropriate for a beginning singer. And I loved all the repertoire I learned, but Les roses d'Ispahan best. Spending absolutely months trying to learn songs that were too hard for me gave me an appreciation that just listening to them never would.

Or, if I'm going with a strict definition of Classical, to get even further away from always going on about Fauré... most of the music I like is either Baroque or Romantic really, but I'm not against the entire Classical period. So let's go with Schubert, whom I always reliably like. I'm choosing the song Heidenröslein for the tune, even though I'm not wholly enamoured of the lyrics. I mean, it's Goethe, but it's also about the poet destroying his lover to punish her for rejecting him. Also because I discovered recently that there's a Rammstein song alluding to it, so I'm using the meme as an excuse to tell you about that.

video embed, containing religious violence )

Happy Tom day!

Wednesday, 26 July 2017 09:58 am
ghoti_mhic_uait: (Default)
[personal profile] ghoti_mhic_uait
I first met Tom in 2001, and he appears to have spent much of the time since dedicated to making my life happier. He assures me this is not the case, and happiness is merely the natural consequence of spending time with him, but I suspect that's because of the myriad of things he does almost without noticing - tea when I'm overwhelmed, holding the baby so I can have a hot meal, switching attention to the toddler just before she got jealous, sharing his knowledge with us, finding exciting day trips.

Head and shoulders portrait of Tom


Anyway, enough about me. The children spent some time thinking about why they love Tom, and came up with some brilliant answers; because he is funny, kind, caring, because he answers questions well, and understands what question you want to ask before you can find the words to ask it. Because he is imaginative, which means he both tells good stories and really understands people.
They landed, however, on what I think is the perfect description: we love him because he is full of love.
Thank you, darling. Here's to the next 40!

Logic Cassandra

Wednesday, 26 July 2017 10:24 am
jack: (Default)
[personal profile] jack
Logic Cassandra: No, don't bring the horse into the city! It has soldiers inside.
Trojans: Pshaw.
Logic Cassandra: Wait, I mean, sit on your hands all night, and nothing much will happen. No gods will give you a big pile of gold.
Trojans: Hah, no way you're putting one over on us. We'll sit here and take the gold, thanks.
Logic Cassandra: In fact, you're going to go on disbelieving everything I say.
Logic Cassandra: *level stare*

"If I was your girl", Meridith Russo; 5 stars

Wednesday, 26 July 2017 01:55 am
marnanel: (Default)
[personal profile] marnanel
A trans girl moves to live with her father in Arizona to escape bullying. She meets people at high school, but she is afraid to come out to them as trans.

The plot is straightforward but enjoyable. Chapters alternate between the present (high school politics and living with her dad) and the past (transition angst and living with her mum). The characters of her parents are especially well-drawn, each with their own tangles of development and motivation.

After the story ends, the author adds two notes: one aimed at cis readers, about understanding trans issues, and one aimed at trans readers, to encourage them and show them some options. I think this is a grand idea.

The only serious fault I find, and it's a fault acknowledged by the author in the endnotes, is that the protagonist has too few problems with transition: she gets hormones easily, she has a girlish build, and she gets bottom surgery earlier than would normally be possible.

There are perhaps too many books about trans people where much of the plot is about them being trans, but they serve a useful function in educating and encouraging (as well as entertaining) and this book does all three.

Strong content warnings for transphobia and bullying, of course; one scene has a graphic suicide attempt; reference to a successful suicide; attempted sexual assault; firearms; soft drugs; no actual sex.

Profile

taimatsu: (Default)
taimatsu

April 2017

M T W T F S S
     12
3 456789
10 111213141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags