On Wed, Nov 13, 2013 at 5:51 PM, Bill Myers <[email protected]> wrote:
> Although, on second thought, one could just free the unused part of the user
> mode stack whenever a thread blocks, either in the user mode code (i.e.
> using madvise MADV_DONTNEED or equivalent to discard everything below the
> stack pointer modulo the page size, perhaps minus the page size) or
> automatically in a modified kernel, and thus greatly reduce the worst case.
>
> It's still going to have higher overhead than the CPS continuations on the
> heap, because the stack will tend to have holes where dead variables live,
> for aligning to page boundaries, and you also keep around the kernel stack
> and kernel scheduler objects.
>
> And it doesn't work on 32-bit, because you cannot have more than around 2048
> tasks with megabyte-sized task stacks (which is way too low for several
> usages), and unfortunately there are lots of 32-bit-only smartphones and
> tablets that should probably be supported.
>

We don't need to worry about scaling on existing phones and tablets.
They have short lifetimes, and most of them don't even receive
security updates. The iPhone 5S is already 64-bit and Android vendors
will move too, especially since they traditionally ship a lot more
memory in even mid-level phones.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to