Welcome, Guest. Please login or register.

Author Topic: NetSurf OS3.x Issues  (Read 41617 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show all replies
Re: NetSurf OS3.x Issues
« on: March 08, 2016, 09:41:36 AM »
Quote from: utri007;805539
Tested with real amigas.

040/AGA is some 20-30% slower than it used to be. Slowdown problem is still there.
 
060/RTG is only slightly slower than it used to be. Nothing when compared to 040.

Forget to say, buttons does work. :)

Tested with TLSFmem and noticed that when slowdown happen, might be just luck. Amiga.org "fetching" time was five first times about 18.5 - 43 seconds and not that order. Untill it decided to spend some 230 seconds to render amiga.org's home page. Next time is displayed page quite fast, but it was still "fetching" some hundred seconds, nothing visible was happening, untill I press stop button.

Nothing weird didn't happen, no erros etc.


tlsf memory is too a bad memory allocator, because it is best fit. this give lots of cache misses, so all slow down. tlsf memory is more for realtime dsp systems which use no caches and it is important to have constant allocate time and no mem fragmentation
 i know years ago, that ixemul is the fastest lots faster libnix and clib2. so i furtherdevelop ixemul. many bash against ixemul. thanks to the work of Arti we all know  the confirm now. On my system too ixemul is lots faster
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show all replies
Re: NetSurf OS3.x Issues
« Reply #1 on: March 08, 2016, 09:45:44 AM »
@Arti. You write in upper post got working non fpu version too. can you post time results, to see how much slower it is ?
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show all replies
Re: NetSurf OS3.x Issues
« Reply #2 on: March 08, 2016, 06:00:06 PM »
Quote from: itix;805566
Ixemul has better memory allocator but ixemul.library is not safe from application using native Amiga API.

can you more precise explain what go wrong ? sdl lib use native AOS functions too. so if it is not safe then it is not possible that sdl open a amiga window or amiga screen or use amiga os semaphores or other aos functions.

since version 47(i do not) ixemul use aos semaphores. so its possible to use aos and ixemul together for semaphore protect too

"Added low-level mutex (semaphore) functions: ix_mutex_lock(),
ix_mutex_attempt_lock() and ix_mutex_unlock(). These functions are
wrappers for the AmigaOS or p.OS kernel semaphore functions. See ix.h for
more info. "

i fix all problems, mainly thread safe problems, when more tasks of 1 program use ixemul functions.
it work now over years ok. netsurf is mix of aos function and unix functions.

only small limit is, that it is not possible to create a new task with the aos function, because for ixemul tasks need additional structure. but it crash if not do correct. as far i remember i add function IX_createtask or something that make it easy. have same parameter as aos function but create the structure need for unix functions

here is sdl  code that create a new task using AOS functions
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
{
   /* Create the thread and go! */
   char buffer[20];

#ifdef WARPOS
   struct TagItem tags[6];
#endif

#ifdef SHARED_LIB
   extern void *myLibPtr;

   ((thread_args *)args)->LibBase= myLibPtr;
   D(bug("CreateThread: librarybase %lx\n",myLibPtr));
#endif

   D(bug("Sending %lx to the new thread...\n",args));

    sprintf(buffer,"%ld",args);


#ifdef WARPOS
    tags[0].ti_Tag = TASKATTR_CODE;                       tags[0].ti_Data = (ULONG)RunThread;
    tags[1].ti_Tag = TASKATTR_NAME;                        tags[1].ti_Data = (ULONG)"SDL subtask";
    tags[2].ti_Tag = TASKATTR_STACKSIZE;                   tags[2].ti_Data = 100000;
    tags[3].ti_Tag = (args ? TASKATTR_R3 : TAG_IGNORE);    tags[3].ti_Data = (ULONG)args;
    tags[4].ti_Tag = TASKATTR_INHERITR2;                   tags[4].ti_Data = TRUE;
    tags[5].ti_Tag = TAG_DONE;                             tags[5].ti_Data = 0;

    thread->handle=CreateTaskPPC(tags);
#else
   unsigned int stack;
   struct Task *t;
   long *pid;
   
   thread->handle=(struct Task *)CreateNewProcTags(
                    /*NP_Output, Output(),
                    NP_Input, Input(),*/
               NP_Name, (ULONG)"SDL subtask",
               /*NP_CloseOutput, FALSE,
                    NP_CloseInput, FALSE,*/
               NP_StackSize, 100000,
               NP_Entry, (ULONG)RunThread,
               NP_Cli, TRUE,
               NP_Arguments, (ULONG)buffer,
               TAG_DONE);

   /*Delay(1); // its a testhack dont activate
   Disable();
   struct Task *t;
   struct Task *t2;
   APTR *data;
    t = FindTask(0);
    data = t->tc_UserData;
    t2 = thread->handle;
   t2->tc_UserData = data;
   Enable();*/
#endif

   if(!thread->handle)
   {
      SDL_SetError("Not enough resources to create thread");
      return(-1);
   }

   return(0);
}
« Last Edit: March 08, 2016, 06:03:53 PM by bernd_afa »
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show all replies
Re: NetSurf OS3.x Issues
« Reply #3 on: March 09, 2016, 04:48:19 PM »
I look in history and there are add many functions that increase compatibility to amiga OS. It is possible to switch from a program to amiga path mode.

* Add ix_UseAmigaPaths(mode) func.
   When mode = 1 then amiga Path Mode is used.
   For example when current dir is sys:wbstartup
   ix_UseAmigaPaths(1);
   h = fopen("/tools.info","r");
   work

That it is possible to create amiga tasks with the amiga function, this function add the needed structure so all is 100% compatible

* ix_CreateChildData function add in libc.a.This create correct Userdata structure ixemul need
     to store filehandles and used memlist of current task when a task is create with amiga OS create Task.
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show all replies
Re: NetSurf OS3.x Issues
« Reply #4 on: March 10, 2016, 04:04:06 PM »
Quote from: itix;805674
To my understanding it is use of tc_SigExcept and Exec exception handlers. I dont havei nterest to fully analyze what ixemul is doing there but it seems it is used to catch CTRL-C and abort program execution immediately. If you are not prepared to that memory leaks can occur. If you are not prepared to that and you are executing critical OS call you crash and burn. It can be fixed by disabling signals before making an OS call, at least ixemul is internally disabling signals when making such OS calls.

the ctrl c exception handler is only used on programs start from shell. a program that is start from wb (netsurf)do not do anything when press CTRL C, i have check it now, press and hold ctrl+c when netsurf run, do nothing. maybe other can too press ctrl+c if they can bring to crash netsurf. if so of course ixemul can fix. most users do not use ctrl+c. so best is for netsurf, switch it off
« Last Edit: March 10, 2016, 04:06:15 PM by bernd_afa »
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show all replies
Re: NetSurf OS3.x Issues
« Reply #5 on: March 10, 2016, 04:28:09 PM »
I test netsurf start on shell window. many single ctrl+c presses do not do anything, but press and hold ctrl+c down more than 10 sec close the netsurf window and let freeze amiga. so better is CTRL+c signal deactivate for netsurf. in ixemul docu stand how this can do
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show all replies
Re: NetSurf OS3.x Issues
« Reply #6 on: March 14, 2016, 12:38:23 PM »
thats because desktop Linux programs that were later 1995 are never test at a 50 MHZ CPU. I have a cheap tablet 2* 1GHZ, this is slow as hell. often when press a key it need 2 or more sec until key is show. i disable name completion, but still slow. I only use for banking app. seem unix interrupt on general is slow.