Giter VIP home page Giter VIP logo

Comments (8)

ysangkok avatar ysangkok commented on May 10, 2024

I solved this using CONFIG_NO_HZ_IDLE and HZ=100.

from v86.

s-macke avatar s-macke commented on May 10, 2024

Yes, that's indeed a problem. Under Javascript the idle time should exceed 4ms. For jor1k I put even HZ=50 here.

from v86.

xming avatar xming commented on May 10, 2024

I wonder how do you avoid 100% CPU (on one core) with Linux, all the Linux images (2.6.x and 3.x) on copy.sh use 100% and my self compiled kernel with CONFIG_NO_HZ_IDLE=y and HZ=50 too, on both firefox and chromium.

from v86.

s-macke avatar s-macke commented on May 10, 2024

Well, I have everything under my control. My own distribution, my own emulator, my own compiled Linux, my own programmed Linux idle function (which wasn't implemented yet).
x86 is much more complicated. So I am not sure, what the Linux operating system expects for a system. I guess you compiled also for a single core.

from v86.

ysangkok avatar ysangkok commented on May 10, 2024

@xming: This repo builds an ISO image with Linux 4 and a 9p root file system for v86 that didn't use 100% CPU last time I tested: https://github.com/ysangkok/build-v86-9p-linux

The repo contains a Linux config that uses the settings I mentioned earlier in this thread.

from v86.

s-macke avatar s-macke commented on May 10, 2024

I would try to debug the setTimeout function in Javascript. to see what is the average timeout in ms for the Javascript engine. Also there is the update of the screen now and then which could influence the total CPU usage.
I tried it myself and it looks like, that the IPS indeed decrease when idle but the CPU usage remains the same.

from v86.

s-macke avatar s-macke commented on May 10, 2024

ysangkok: Do you have a binary?

from v86.

ysangkok avatar ysangkok commented on May 10, 2024

@s-macke yes

Here's the ISO image: https://hushfile.it/55681e725bfa2#HGrNrA2-vQP4QW20zblBtY-AjHfqrpStbaqhurka
Here's the root filesystem: https://hushfile.it/55681fc278c8d#DgLyVmrj8E-EEes80V2duyTEPQ0Sdgkai2SDpu0C
Here's the root filesystem JSON: https://hushfile.it/55682033f0e6f#8yX12xOCqtYu_a98KyRS9r5ts15NjkqtaTv5wH8H

And here's a sample HTML file that has a 9p filesystem configured for it: https://github.com/ysangkok/browser-http-proxy/blob/master/basic.html

from v86.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.