disabling ps3fbd

Discussion in 'CellPerformance@B3D' started by msroka, Jul 17, 2008.

  1. msroka

    Newcomer

    Joined:
    Jul 17, 2008
    Messages:
    6
    Likes Received:
    0
    I am writing software for the Cell and I am testing it currently on a PS3 with Fedora 6 and sdk 2.1. My software is for digital signal communications and hence I don't need any display capabilities.
    Recently I have been doing profiling of my software and it appears the PS3 framebuffer utility is very intrusive (and thus I am not meeting real-time).
    Does anyone in this community know how I can turn it off ps3fbd? I'm sorry if this is a dumb question, but I'm not really a linux guy.

    Thanks in advance for any help.
     
  2. betan

    Veteran

    Joined:
    Jan 26, 2007
    Messages:
    2,315
    Likes Received:
    0
    Normally on linux you can add nofb or vga=normal to kernel parameters to disable framebuffer.
    In your case that probably means duplicating the default entry on kboot.conf and editing one of them appropriately.

    However I have no idea what would happen on PS3 without framebuffer, you may loose console or even X if it works over fb. If ssh server (sshd) is setup, who cares? ;)

    Good news is if you don't mess up kboot.conf (that's what Fedora uses right?), you can always reboot to your default setup.
     
  3. msroka

    Newcomer

    Joined:
    Jul 17, 2008
    Messages:
    6
    Likes Received:
    0
    kboot.conf

    I tried changing my mode in kboot.conf to text with no luck. How is it exactly I should change kboot.conf? Here's what I've got in mine.

    default=text
    timeout=10
    root=LABEL=/

    auto='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:0'
    linux='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:6'
    fc576i='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:6'
    fc480i='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:1'
    fc576p='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:7'
    fc480p='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:1'
    fc720p='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:3'
    fc1080i='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:4'
    fc1080p='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img video=ps3fb:mode:5'
    text='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img 3'
    singleuser='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img single'
     
  4. betan

    Veteran

    Joined:
    Jan 26, 2007
    Messages:
    2,315
    Likes Received:
    0
    msroka I got your post(s), you're being spam flagged so it will take time for it to show up.
    Before that though, tell me two things:
    Do you have ssh server running and a PC within networks reach?
    And is the framebuffer overhead same for both interlaced (720i) and progressive (720p etc) videos?
     
  5. msroka

    Newcomer

    Joined:
    Jul 17, 2008
    Messages:
    6
    Likes Received:
    0
    sorry for the excessive posts. It appeared to me that they didn't take.

    To answer your questions: Yes, in fact after I set up linux on the ps3, I haven't had a console attached since. I only use it via ssh.
    As far as your second question, I haven't tested this. What I do see in timing my threads on the PPU that every 1/60 of a second they spike and take 2 orders of magnitude longer to execute and as a result don't keep my spes appropriately fed.

    Now in the past I bumped up against this (with a double-buffering benchmark) and I thought my solution was to set the ps3videomode to auto and with no monitor attached, it appeared to not spawn the daemon. For some reason this is not the case now, even though I have not modified the system since. So that's a little confusing to me.
     
  6. betan

    Veteran

    Joined:
    Jan 26, 2007
    Messages:
    2,315
    Likes Received:
    0
    Okay, I guess that looks like ps3fbd copying virtual frame buffer to vram.
    I'm not sure when ps3fbd is spawned. It's probably a kthread so may be difficult kill or stop in the userspace. Doesn't that benchmark document how to stop ps3fpd? There may even be IOCTL parameters for better controls on /dev/fb (?).

    If you don't feel like going through the source code/documentation , the first thing I would try would be adding nofb to kernel parameters as I said earlier. This only works if ps3fb is actually on top of normal framebuffer "module".

    I see that your default entry on kboot is runlevel 3, assuming this indeed prevents X server from starting, have you tried adding nofb to "text" entry?

    text='/boot/vmlinux-2.6.16 initrd=/boot/initrd.img 3 nofb'
     
  7. msroka

    Newcomer

    Joined:
    Jul 17, 2008
    Messages:
    6
    Likes Received:
    0
    Ok well i tried the nofb option to no avail. As far as the benchmark goes, it was one I wrote. Sorry for the confusion. What active processes should I look for to determine if X is running?

    Here's my output from top.

    top - 19:15:54 up 24 min, 3 users, load average: 1.00, 1.06, 0.91
    Tasks: 53 total, 1 running, 52 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0%us, 0.8%sy, 0.0%ni, 99.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 202272k total, 140812k used, 61460k free, 8100k buffers
    Swap: 524280k total, 0k used, 524280k free, 106480k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    62 root 15 0 0 0 0 D 2 0.0 0:18.70 ps3fbd
    2856 msroka 16 0 10912 1736 1252 S 0 0.9 0:00.25 sshd
    3957 msroka 16 0 2700 1232 996 R 0 0.6 0:01.08 top
    1 root 16 0 2600 796 696 S 0 0.4 0:00.34 init
    2 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
    3 root 34 19 0 0 0 S 0 0.0 0:00.15 ksoftirqd/0
    4 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
    5 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/1
    6 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
    7 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
    8 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/0
    9 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/1
    10 root 11 -5 0 0 0 S 0 0.0 0:00.02 khelper
    11 root 10 -5 0 0 0 S 0 0.0 0:00.00 kthread
    19 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/0
    20 root 10 -5 0 0 0 S 0 0.0 0:00.00 kblockd/1
    23 root 10 -5 0 0 0 S 0 0.0 0:00.01 khubd
    54 root 20 0 0 0 0 S 0 0.0 0:00.00 pdflush
    55 root 15 0 0 0 0 S 0 0.0 0:00.00 pdflush
    57 root 11 -5 0 0 0 S 0 0.0 0:00.00 aio/0
    58 root 10 -5 0 0 0 S 0 0.0 0:00.00 aio/1
    56 root 15 0 0 0 0 S 0 0.0 0:00.00 kswapd0
    690 root 11 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_0
    692 root 10 -5 0 0 0 S 0 0.0 0:00.00 ps3pfstor-0-0
    696 root 11 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1
    698 root 10 -5 0 0 0 S 0 0.0 0:00.44 ps3pfstor-1-0
    705 root 11 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_2
    707 root 10 -5 0 0 0 S 0 0.0 0:00.00 ps3pfstor-2-0
    757 root 11 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_3
    758 root 10 -5 0 0 0 S 0 0.0 0:00.00 usb-storage
    781 root 15 0 0 0 0 S 0 0.0 0:00.10 kjournald
    856 root 11 -4 3028 800 412 S 0 0.4 0:00.87 udevd
    2516 root 15 0 2664 516 208 S 0 0.3 0:00.00 dhclient
    2571 root 16 0 1884 328 248 S 0 0.2 0:00.00 irqbalance
    2597 root 17 0 2044 592 516 S 0 0.3 0:00.00 sdpd
    2611 root 10 -10 0 0 0 S 0 0.0 0:00.00 krfcommd
    2665 root 16 0 7232 1028 696 S 0 0.5 0:00.00 sshd
    2678 root 18 0 6276 536 272 S 0 0.3 0:00.00 vsftpd
    2720 root 17 0 3108 632 432 S 0 0.3 0:00.00 gpm
    2760 xfs 16 0 5300 1780 888 S 0 0.9 0:00.05 xfs
    2787 root 18 0 1872 548 484 S 0 0.3 0:00.00 mingetty
    2788 root 16 0 10764 2700 2236 S 0 1.3 0:00.08 sshd
    2796 msroka 16 0 10912 1736 1252 S 0 0.9 0:00.27 sshd
    2803 msroka 16 0 6120 1752 1464 S 0 0.9 0:00.06 bash
    2821 root 17 0 7356 1368 1120 S 0 0.7 0:00.01 su
    2830 root 16 0 6120 1776 1484 S 0 0.9 0:00.23 bash
    2848 root 16 0 10764 2700 2236 S 0 1.3 0:00.07 sshd
    2863 msroka 15 0 6120 1788 1496 S 0 0.9 0:00.07 bash
    2894 root 16 0 10764 2700 2236 S 0 1.3 0:00.07 sshd
    2902 msroka 16 0 10912 1736 1252 S 0 0.9 0:00.07 sshd
    2909 msroka 16 0 6120 1752 1464 S 0 0.9 0:00.06 bash
    2927 root 17 0 7356 1368 1120 S 0 0.7 0:00.01 su
    2936 root 16 0 6120 1764 1472 S 0 0.9 0:00.12 bash
     
  8. betan

    Veteran

    Joined:
    Jan 26, 2007
    Messages:
    2,315
    Likes Received:
    0
    you can check whether X is running simply by
    ps aux | grep X

    but if your kboot.conf text entry came with Fedora I doubt you'll find X running.

    Anyway, I googled ioctl ps3fbd and as suspected there is a way to disable that naughty memory transfer using ioctl (specifically PS3FB_IOCTL_ON flag).

    http://felter.org/wesley/files/ps3/linux-20061110-docs/ApplicationProgrammingEnvironment.html

    (That's even under double buffering example.)

    to be safe use PS3FB_IOCTL_OFF when you are done.

    edit: I'm curious though how you disabled that in your own double buffering example, because I don't expect PS3 to display anything without it.
     
  9. msroka

    Newcomer

    Joined:
    Jul 17, 2008
    Messages:
    6
    Likes Received:
    0
    Thank you I will try this.

    In my benchmark, I was simply double buffering data to and from the spes to measure the impact of communication on optimized SPE code (ie. comm overlap). There was just generic data movement from the PPU to the SPE and not for the purpose of display.

    Thanks again for your help.
     
  10. tuna

    Veteran

    Joined:
    Mar 10, 2002
    Messages:
    3,126
    Likes Received:
    350
    What version of the kernel Linux do you use. If you use an old version, there could be bugs present. Have you tried compiling the latest version?
     
  11. msroka

    Newcomer

    Joined:
    Jul 17, 2008
    Messages:
    6
    Likes Received:
    0
    No I haven't tried this. I am using sdk 2.1 and since I want to keep using the free xlc compiler, I can't upgrade to 3.0. I believe sdk 2.1 only works with fedora 6 which is what I have. Not sure of the version currently, but when I'm back in the office I can find out. I suppose I could upgrade to whatever was still fedora 6.

    Do you think that this will make the psfbd behave less intrusively?
     
  12. tuna

    Veteran

    Joined:
    Mar 10, 2002
    Messages:
    3,126
    Likes Received:
    350
    You should be able to build a new version of the kernel Linux without affecting the rest of your system. You can also have multiple kernels that you can switch when booting up.

    I can't say if a newer kernel will solve your problems, but if you want to get support from something like the CBE-OSS developers you probably have to use a version of Linux that is current
     
  13. betan

    Veteran

    Joined:
    Jan 26, 2007
    Messages:
    2,315
    Likes Received:
    0
    I have 2.6.25.4, and ps3fbd is intrusive. Top reports between 1-4% CPU usage depending on resolution (ps3-video-mode).

    Why aren't you using ioctl, it seems to work fine and you don't need SDK or anything besides the standard linux stuff?

    edit: I forgot to add that ps3fbd stops flipping framebuffer when console goes blank (screensaver), that would be why cell people weren't complaining about it. And that's another alternative to look into.
     
    #13 betan, Jul 28, 2008
    Last edited by a moderator: Jul 28, 2008
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...