Re: How do I learn the Hurd stuff?

2018-08-31 Thread Joan Lledó
Missatge de Joshua Branson  del dia dc., 29
d’ag. 2018 a les 22:57:
> That makes sense.  Can we trouble you for a teaser update on the mailing list?

It's OK, buts there's not really too much to say. The translator is
upstream and we created a debian package to install lwip as a user
shared library, also in Linux.

I started working with the release 2.0.1 but now we use 2.0.3. I use
lwip 2.0.3 in my hurd box instead of pfinet and everything works fine
for me, but I always do the same few things: apt, git, ssh, wget... so
I don't know how would it behave on a production environment.

Now we're trying to upstream as much code as possible from our lwip
patches to reduce the effort required to update to future lwip
releases.

That's all for lwip so far.

On the other hand, I think this thread is becoming huge and off-topic,
so if there's somebody who wants to know more about lwip, I suggest to
open a new thread.



Re: How do I learn the Hurd stuff?

2018-08-31 Thread liberamenso10000
Ok. I forgot a little piece of the project: detect CPU in runtime, to avoid set 
the number manually before compilation. I speak of this previously, but I 
forget to refer It in my latest message. 

El Viernes 31 de agosto de 2018, Samuel Thibault escribió:
> Almudena Garcia, le ven. 31 août 2018 13:28:18 +0200, a ecrit:
> > Yes. Then, I think that the MMU (Memory Management Unit) has a special case 
> > to
> > multiprocessor in pmap.c. If It's correct, then we don't need to implement
> > multiprocessor support in MMU (may we need to fix any error, of course).
> 
> That's it, yes. Basically the support already exist in GNU Mach, it just
> has never been tested for a long time and bits have probably got broken
> with other changes.
> 
> > So, to implement SMP, we have to add IPI support in process scheduler
> 
> The process scheduler probably already has the support. What is missing
> is the hardware driver for SMP: enumeration and initialization.
> 
> Samuel
>

-- 
Enviado desde mi Jolla

Re: How do I learn the Hurd stuff?

2018-08-31 Thread Samuel Thibault
Almudena Garcia, le ven. 31 août 2018 13:28:18 +0200, a ecrit:
> Yes. Then, I think that the MMU (Memory Management Unit) has a special case to
> multiprocessor in pmap.c. If It's correct, then we don't need to implement
> multiprocessor support in MMU (may we need to fix any error, of course).

That's it, yes. Basically the support already exist in GNU Mach, it just
has never been tested for a long time and bits have probably got broken
with other changes.

> So, to implement SMP, we have to add IPI support in process scheduler

The process scheduler probably already has the support. What is missing
is the hardware driver for SMP: enumeration and initialization.

Samuel



Re: How do I learn the Hurd stuff?

2018-08-31 Thread Almudena Garcia
Yes. Then, I think that the MMU (Memory Management Unit) has a special case
to multiprocessor in pmap.c. If It's correct, then we don't need to
implement multiprocessor support in MMU (may we need to fix any error, of
course).

So, to implement SMP, we have to add IPI support in process scheduler and
isolate the drivers. Is It correct?
About drivers, I think that isolate Linux drivers are a good option, while
the migration to userspace is in development. Once this migration will be
ready, we will undo the isolation of this drivers.


Thanks, and excuse me the offtopic.

El jue., 30 ago. 2018 a las 23:56, Samuel Thibault ()
escribió:

> Almudena Garcia, le jeu. 30 août 2018 23:46:46 +0200, a ecrit:
> > Yes. With "duplicate", I referred to exists code files which has an
> > implementation to single core case and other implementation to the
> multicore
> > case.
> > Not the same exact code, simply the files has different algorithms to
> each
> > case.
>
> Then that's really very common in OSes.
>
> Samuel
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Samuel Thibault
Almudena Garcia, le jeu. 30 août 2018 23:46:46 +0200, a ecrit:
> Yes. With "duplicate", I referred to exists code files which has an
> implementation to single core case and other implementation to the multicore
> case.
> Not the same exact code, simply the files has different algorithms to each
> case.

Then that's really very common in OSes.

Samuel



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
Yes. With "duplicate", I referred to exists code files which has an
implementation to single core case and other implementation to the
multicore case.
Not the same exact code, simply the files has different algorithms to each
case.

El jue., 30 ago. 2018 a las 23:37, Samuel Thibault ()
escribió:

> Almudena Garcia, le jeu. 30 août 2018 20:43:24 +0200, a ecrit:
> > If I execute "grep -R "NCPUS > 1", it returns this files ;)
>
> > kern/machine.c:#ifNCPUS > 1
> > kern/machine.c:#endif/* NCPUS > 1 */
> > kern/machine.c:#ifNCPUS > 1
> > kern/machine.c:#else/* NCPUS > 1 */
> > kern/machine.c:#endif /* NCPUS > 1 */
>
> That does not mean code duplication, but just special-casing, which is
> really not surprising for an OS.
>
> Samuel
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Samuel Thibault
Almudena Garcia, le jeu. 30 août 2018 20:43:24 +0200, a ecrit:
> If I execute "grep -R "NCPUS > 1", it returns this files ;)

> kern/machine.c:#if    NCPUS > 1
> kern/machine.c:#endif    /* NCPUS > 1 */
> kern/machine.c:#if    NCPUS > 1
> kern/machine.c:#else    /* NCPUS > 1 */
> kern/machine.c:#endif /* NCPUS > 1 */

That does not mean code duplication, but just special-casing, which is
really not surprising for an OS.

Samuel



RE: How do I learn the Hurd stuff?

2018-08-30 Thread Adam Van Ymeren
Enabling multicore support in the processor is only a small part of the 
problem.  The OS is still in charge of deciding how to utilize those multiple 
cores to run all its threads and processes.

From: Almudena Garcia
Sent: Thursday, August 30, 2018 1:36 PM
To: Richard Braun; bug-hurd@gnu.org; Joshua Branson
Subject: Re: How do I learn the Hurd stuff?

But... Why we can't implement this via hardware? Configuring multiprocessor in 
the CPU.
I don't know what is the problem to do this. 

Also, this multiprocessor support can be optional, allowing the user to enable 
or disable It.





El jue., 30 ago. 2018 a las 19:01, Samuel Thibault () 
escribió:
Hello,

Almudena Garcia, le jeu. 30 août 2018 18:58:19 +0200, a ecrit:
> Instead, It feels to use a strange implementation to do
> multithreading (not real multiprocessor) via software.

It's not "strange", it's what all OSes do. Even with multiple
processors, OSes do that, to schedule threads on the available
processors via software.

Samuel



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Samuel Thibault
Almudena Garcia, le jeu. 30 août 2018 20:30:57 +0200, a ecrit:
> For example, I saw the duplicated code in pmap.h and pmap.c.

Which duplication? All I see there is macros which are non-trivial in
the SMP case, and very trivial in the non-SMP case.

> Also in kern/ cpu_number.h (the code what I fixed),

Well, that's only to be expected: in non-SMP case it is trivial, and in
the SMP case it is not.

> and many codes in kern/ directory.

Please be more specific :)

> is there any guide to understanding GNU Mach code? To learn about what do each
> file.

I don't know, I guess the wiki has pointers. Probably there is also
reading about the Mach kernel in general (GNU Mach is really largely
based on the Mach family).

Samuel



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
If I execute "grep -R "NCPUS > 1", it returns this files ;)

kern/machine.c:#ifNCPUS > 1
kern/machine.c:#endif/* NCPUS > 1 */
kern/machine.c:#ifNCPUS > 1
kern/machine.c:#else/* NCPUS > 1 */
kern/machine.c:#endif /* NCPUS > 1 */
kern/processor.c:#ifNCPUS > 1
kern/processor.c:#endif/* NCPUS > 1 */
kern/processor.c:#ifNCPUS > 1
kern/processor.c:#else/* NCPUS > 1 */
kern/processor.c:#endif/* NCPUS > 1 */
kern/processor.c:#ifNCPUS > 1
kern/processor.c:#else/* NCPUS > 1 */
kern/processor.c:#endif/* NCPUS > 1 */
kern/processor.c:#ifNCPUS > 1
kern/processor.c:#else/* NCPUS > 1 */
kern/processor.c:#endif/* NCPUS > 1 */
kern/processor.c:#ifNCPUS > 1
kern/processor.c:#else/* NCPUS > 1 */
kern/processor.c:#endif/* NCPUS > 1 */
kern/mach_clock.c:#ifNCPUS > 1
kern/mach_clock.c:#endif/* NCPUS > 1 */
kern/mach_clock.c:#ifNCPUS > 1
kern/mach_clock.c:#endif/* NCPUS > 1 */
kern/mach_clock.c:#ifNCPUS > 1
kern/mach_clock.c:#endif/* NCPUS > 1 */
kern/mach_clock.c:#ifNCPUS > 1
kern/mach_clock.c:#endif/* NCPUS > 1 */
kern/startup.c:#ifNCPUS > 1
kern/startup.c:#endif/* NCPUS > 1 */
kern/startup.c:#ifNCPUS > 1
kern/startup.c:#endif/* NCPUS > 1 */
kern/startup.c:#ifNCPUS > 1
kern/startup.c:#endif/* NCPUS > 1 */
kern/ast.h:#ifNCPUS > 1
kern/syscall_subr.c:#ifNCPUS > 1
kern/syscall_subr.c:#endif/* NCPUS > 1 */
kern/syscall_subr.c:#ifNCPUS > 1
kern/syscall_subr.c:#endif/* NCPUS > 1 */
kern/syscall_subr.c:#ifNCPUS > 1
kern/syscall_subr.c:#endif/* NCPUS > 1 */
kern/sched_prim.c:#ifNCPUS > 1
kern/sched_prim.c:#endif/* NCPUS > 1 */
kern/sched_prim.c:#ifNCPUS > 1
kern/sched_prim.c:#endif/* NCPUS > 1 */
kern/sched_prim.c:#ifNCPUS > 1
kern/sched_prim.c:#endif/* NCPUS > 1 */
kern/sched_prim.c:#ifNCPUS > 1
kern/sched_prim.c:#else/* NCPUS > 1 */
kern/sched_prim.c:#endif/* NCPUS > 1 */
kern/processor.h:#ifNCPUS > 1
kern/processor.h:#endif/* NCPUS > 1 */
kern/processor.h:#ifNCPUS > 1
kern/processor.h:#endif/* NCPUS > 1 */
kern/processor.h:#ifNCPUS > 1
kern/processor.h:#endif/* NCPUS > 1 */
kern/ast.c:#ifNCPUS > 1
kern/ast.c:#endif/* NCPUS > 1 */
kern/thread.c:#ifNCPUS > 1
kern/thread.c:#endif/* NCPUS > 1 */
kern/thread.c:#ifNCPUS > 1
kern/thread.c:#endif/* NCPUS > 1 */
kern/eventcount.c:#if (NCPUS > 1)
kern/eventcount.c:#if NCPUS > 1
kern/eventcount.c:#if (NCPUS > 1)
kern/eventcount.c:#endif/* NCPUS > 1 */
kern/lock_mon.c:#ifNCPUS > 1 && MACH_LOCK_MON
kern/lock_mon.c:#endif/* NCPUS > 1 && MACH_LOCK_MON */
kern/debug.c:#if NCPUS > 1
kern/debug.c:#ifNCPUS > 1
kern/priority.c:#ifNCPUS > 1
kern/priority.c:#ifNCPUS > 1
kern/priority.c:#endif/* NCPUS > 1 */
kern/priority.c:#ifNCPUS > 1
kern/priority.c:#else/* NCPUS > 1 */
kern/priority.c:#endif/* NCPUS > 1 */
kern/priority.c:#ifNCPUS > 1
kern/priority.c:#endif/* NCPUS > 1 */
kern/ipc_sched.c:#ifNCPUS > 1
kern/ipc_sched.c:#else/* NCPUS > 1 */
kern/ipc_sched.c:#endif/* NCPUS > 1 */
kern/ipc_sched.c:#ifNCPUS > 1
kern/ipc_sched.c:#endif/* NCPUS > 1 */
kern/lock.h:#if NCPUS > 1
kern/lock.h:#define MACH_SLOCKS((NCPUS > 1) || MACH_LDEBUG)
kern/lock.h:#if(NCPUS > 1)
kern/lock.h:#else/* NCPUS > 1 */
kern/lock.h:#endif/* NCPUS > 1 */
kern/lock.c:#ifNCPUS > 1
kern/lock.c:#endif/* NCPUS > 1 */
kern/lock.c:#ifNCPUS > 1
kern/lock.c:#else/* NCPUS > 1 */
kern/lock.c:#endif/* NCPUS > 1 */
kern/thread.h:#ifNCPUS > 1
kern/thread.h:#endif/* NCPUS > 1 */
device/dev_master.h:#ifNCPUS > 1
device/dev_master.h:#elseNCPUS > 1
device/dev_master.h:#endifNCPUS > 1
i386/linux/dev/include/linux/autoconf.h:#if NCPUS > 1
i386/i386/ast_check.c:#ifNCPUS > 1
i386/i386/ast_check.c:#endif/* NCPUS > 1 */
i386/i386/cswitch.S:#ifNCPUS > 1
i386/i386/cswitch.S:#endif/* NCPUS > 1 */
i386/i386/spl.S:#if NCPUS > 1
i386/i386/db_interface.c:#ifNCPUS > 1
i386/i386/db_interface.c:#endif/* NCPUS > 1 */
i386/i386/db_interface.c:#ifNCPUS > 1
i386/i386/db_interface.c:#endif/* NCPUS > 1 */
i386/i386/db_interface.c:#ifNCPUS > 1
i386/i386/db_interface.c:#endif/* NCPUS > 1 */
i386/i386/db_interface.c:#ifNCPUS > 1
i386/i386/db_interface.c:#endif/* NCPUS > 1 */
i386/i386/pcb.c:#ifNCPUS > 1
i386/i386/pcb.c:#ifNCPUS > 1
i386/i386/fpu.h:#ifNCPUS > 1
i386/i386/mp_desc.c:#ifNCPUS > 1
i386/i386/mp_desc.c:#endif/* NCPUS > 1 */
i386/i386/fpu.c:#else/* NCPUS > 1 */
i386/i386/lock.h:#if NCPUS > 1
i386/i386/lock.h:#endif /* NCPUS > 1 */
i386/i386/cpu_number.h:#ifNCPUS > 1
i386/intel/pmap.h:#ifNCPUS > 1
i386/intel/pmap.h:#endif/* NCPUS > 1 */
i386/intel/pmap.h:#ifNCPUS > 1
i386/intel/pmap.h:#else/* NCPUS > 1 */
i386/intel/pmap.h:#endif/* NCPUS > 1 */
i386/intel/pmap.h:#if NCPUS > 1
i386/intel/pmap.h:#endif/* NCPUS > 1 

Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
> Both components are duplicated its codes to run with a single processor
and
> multiprocessor.

Which duplication do you see? sched_prim.c is shared.


For example, I saw the duplicated code in pmap.h and pmap.c. Also in
kern/cpu_number.h (the code what I fixed), and many codes in kern/
directory.

I didn't see sched_prim.c, sorry.

is there any guide to understanding GNU Mach code? To learn about what do
each file.

Thanks, and sorry





El jue., 30 ago. 2018 a las 20:21, Samuel Thibault ()
escribió:

> Almudena Garcia, le jeu. 30 août 2018 20:12:07 +0200, a ecrit:
> > Both components are duplicated its codes to run with a single processor
> and
> > multiprocessor.
>
> Which duplication do you see? sched_prim.c is shared.
>
> > Also, there is another problem with drivers, what aren't thread-safe.
> Then, we
> > have to isolate these process to avoid concurrency problems
>
> Yes, this is a real concern. For the Linux drivers, the long-term goal
> is to move them to userland anyway. For Mach drivers, quite often they
> are not performance-sensitive, so big locks would be enough.
>
> Samuel
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Samuel Thibault
Almudena Garcia, le jeu. 30 août 2018 20:12:07 +0200, a ecrit:
> Both components are duplicated its codes to run with a single processor and
> multiprocessor.

Which duplication do you see? sched_prim.c is shared.

> Also, there is another problem with drivers, what aren't thread-safe. Then, we
> have to isolate these process to avoid concurrency problems

Yes, this is a real concern. For the Linux drivers, the long-term goal
is to move them to userland anyway. For Mach drivers, quite often they
are not performance-sensitive, so big locks would be enough.

Samuel



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
Yes, I know. But the processor scheduler is implemented yet in GNU Mach
code. Also the Memory Management Unit.
Both components are duplicated its codes to run with a single processor and
multiprocessor. May can be needed to do code fixes to repair any error, but
these components exist.

Also, there is another problem with drivers, what aren't thread-safe. Then,
we have to isolate these process to avoid concurrency problems






El jue., 30 ago. 2018 a las 19:54, Adam Van Ymeren ()
escribió:

> Enabling multicore support in the processor is only a small part of the
> problem.  The OS is still in charge of deciding how to utilize those
> multiple cores to run all its threads and processes.
>
>
>
> *From: *Almudena Garcia 
> *Sent: *Thursday, August 30, 2018 1:36 PM
> *To: *Richard Braun ; bug-hurd@gnu.org; Joshua Branson
> 
> *Subject: *Re: How do I learn the Hurd stuff?
>
>
>
> But... Why we can't implement this via hardware? Configuring
> multiprocessor in the CPU.
> I don't know what is the problem to do this.
>
>
>
> Also, this multiprocessor support can be optional, allowing the user to
> enable or disable It.
>
>
>
>
>
>
>
>
>
>
>
> El jue., 30 ago. 2018 a las 19:01, Samuel Thibault (<
> samuel.thiba...@gnu.org>) escribió:
>
> Hello,
>
> Almudena Garcia, le jeu. 30 août 2018 18:58:19 +0200, a ecrit:
> > Instead, It feels to use a strange implementation to do
> > multithreading (not real multiprocessor) via software.
>
> It's not "strange", it's what all OSes do. Even with multiple
> processors, OSes do that, to schedule threads on the available
> processors via software.
>
> Samuel
>
>
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Samuel Thibault
Almudena Garcia, le jeu. 30 août 2018 19:35:23 +0200, a ecrit:
> But... Why we can't implement this via hardware?

Because it would cast into stone the way to schedule threads. OSes use
very finely tuned heuristics (for fairness, priorities, locality, etc.)
to schedule threads, which we do not want to see hardwired in hardware.

Really, all the support you want to get from the hardware is just
getting the number of processors, initializing them, and support for
interprocessor interrupts (IPI) for signalling.

Samuel



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
But... Why we can't implement this via hardware? Configuring multiprocessor
in the CPU.
I don't know what is the problem to do this.

Also, this multiprocessor support can be optional, allowing the user to
enable or disable It.





El jue., 30 ago. 2018 a las 19:01, Samuel Thibault ()
escribió:

> Hello,
>
> Almudena Garcia, le jeu. 30 août 2018 18:58:19 +0200, a ecrit:
> > Instead, It feels to use a strange implementation to do
> > multithreading (not real multiprocessor) via software.
>
> It's not "strange", it's what all OSes do. Even with multiple
> processors, OSes do that, to schedule threads on the available
> processors via software.
>
> Samuel
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Samuel Thibault
Hello,

Almudena Garcia, le jeu. 30 août 2018 18:58:19 +0200, a ecrit:
> Instead, It feels to use a strange implementation to do
> multithreading (not real multiprocessor) via software.

It's not "strange", it's what all OSes do. Even with multiple
processors, OSes do that, to schedule threads on the available
processors via software.

Samuel



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
>
> That's not what I meant. Please improve your English.


Excuse me, I'm trying to improve my English, hahaha.

You're heavily misusing words here. You're not talking about a "hardware
> SMP implementation", just asking the system how many processors it has.
> That's a very tiny detail among all that's required to write a decent
> scalable SMP kernel.
>

Not, It's not true. The detect how many processors have the machine It's
only a little piece of the project.

I want to add a code what, in case of has more than one processor,
initialize the CPU enabling multiprocessor support.
Currently, Mach doesn't initialize the multiprocessor in the CPU when
detecting more than one core. Instead, It feels to use a strange
implementation to do multithreading (not real multiprocessor) via software.

Then, I want to enable this real multiprocessor support, enabling in the
CPU initialization during Mach boot.


El jue., 30 ago. 2018 a las 18:24, Richard Braun ()
escribió:

> On Thu, Aug 30, 2018 at 06:15:28PM +0200, Almudena Garcia wrote:
> > It's not only a test. Obviously, It must start as a test, but I want to
> add
> > this to Hurd if runs.
> >
> >
> >
> > El jue., 30 ago. 2018 a las 18:02, Richard Braun ()
> > escribió:
> >
> > > On Thu, Aug 30, 2018 at 05:53:42PM +0200, Almudena Garcia wrote:
> > > > I've said It yet.
> > > >
> > > > > As this
> > > > > form, we don't need to know how many cores has the processor and
> set
> > > the
> > > > > core number in Mach in compilation time. Instead, the same
> processor
> > > will
> > > > > detect the cores number and configure SMP automatically.
> > > >
> > > > I don't know the exact assembly instructions, but I read about the
> > > > processor can be configured from assembly to run in multicore mode.
> > > > Then, what we had to do is to write a routine that initializes the
> > > > processor with this multicore support, during Mach boot.
> > > >
> > > > In this guide, in Chapter 8.4 feels to be a better explanation about
> how
> > > to
> > > > do this (initialization example in 8.4.4):
> > > >
> > >
> https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html
> > >
> > > Oh, so it's merely runtime probing.
>
> That's not what I meant. Please improve your English.
>
> You're heavily misusing words here. You're not talking about a "hardware
> SMP implementation", just asking the system how many processors it has.
> That's a very tiny detail among all that's required to write a decent
> scalable SMP kernel.
>
> --
> Richard Braun
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Richard Braun
On Thu, Aug 30, 2018 at 06:15:28PM +0200, Almudena Garcia wrote:
> It's not only a test. Obviously, It must start as a test, but I want to add
> this to Hurd if runs.
> 
> 
> 
> El jue., 30 ago. 2018 a las 18:02, Richard Braun ()
> escribió:
> 
> > On Thu, Aug 30, 2018 at 05:53:42PM +0200, Almudena Garcia wrote:
> > > I've said It yet.
> > >
> > > > As this
> > > > form, we don't need to know how many cores has the processor and set
> > the
> > > > core number in Mach in compilation time. Instead, the same processor
> > will
> > > > detect the cores number and configure SMP automatically.
> > >
> > > I don't know the exact assembly instructions, but I read about the
> > > processor can be configured from assembly to run in multicore mode.
> > > Then, what we had to do is to write a routine that initializes the
> > > processor with this multicore support, during Mach boot.
> > >
> > > In this guide, in Chapter 8.4 feels to be a better explanation about how
> > to
> > > do this (initialization example in 8.4.4):
> > >
> > https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html
> >
> > Oh, so it's merely runtime probing.

That's not what I meant. Please improve your English.

You're heavily misusing words here. You're not talking about a "hardware
SMP implementation", just asking the system how many processors it has.
That's a very tiny detail among all that's required to write a decent
scalable SMP kernel.

-- 
Richard Braun



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Richard Braun
On Thu, Aug 30, 2018 at 05:53:42PM +0200, Almudena Garcia wrote:
> I've said It yet.
> 
> > As this
> > form, we don't need to know how many cores has the processor and set the
> > core number in Mach in compilation time. Instead, the same processor will
> > detect the cores number and configure SMP automatically.
> 
> I don't know the exact assembly instructions, but I read about the
> processor can be configured from assembly to run in multicore mode.
> Then, what we had to do is to write a routine that initializes the
> processor with this multicore support, during Mach boot.
> 
> In this guide, in Chapter 8.4 feels to be a better explanation about how to
> do this (initialization example in 8.4.4):
> https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html

Oh, so it's merely runtime probing.

-- 
Richard Braun



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
It's not only a test. Obviously, It must start as a test, but I want to add
this to Hurd if runs.



El jue., 30 ago. 2018 a las 18:02, Richard Braun ()
escribió:

> On Thu, Aug 30, 2018 at 05:53:42PM +0200, Almudena Garcia wrote:
> > I've said It yet.
> >
> > > As this
> > > form, we don't need to know how many cores has the processor and set
> the
> > > core number in Mach in compilation time. Instead, the same processor
> will
> > > detect the cores number and configure SMP automatically.
> >
> > I don't know the exact assembly instructions, but I read about the
> > processor can be configured from assembly to run in multicore mode.
> > Then, what we had to do is to write a routine that initializes the
> > processor with this multicore support, during Mach boot.
> >
> > In this guide, in Chapter 8.4 feels to be a better explanation about how
> to
> > do this (initialization example in 8.4.4):
> >
> https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html
>
> Oh, so it's merely runtime probing.
>
> --
> Richard Braun
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Richard Braun
On Thu, Aug 30, 2018 at 05:32:40PM +0200, Almudena Garcia wrote:
> Excuse me, It's a little offtopic.
> 
> I was talking about implement SMP via hardware in Hurd (Mach really). In
> this implementation, Mach configures the processor during the boot,
> enabling multicore support. (All Pentium 4 or modern x86 processor supports
> this)
> 
> In the current SMP support, this multicore support feels been build from
> software, generating the threads and assigning It to the processor from
> software. Then, my idea is to start a project to change this SMP software
> to a newer implementation via hardware, as I previously said.  As this
> form, we don't need to know how many cores has the processor and set the
> core number in Mach in compilation time. Instead, the same processor will
> detect the cores number and configure SMP automatically.
> 
> https://c9x.me/x86/html/file_module_x86_id_45.html
> 
> https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html

What is "a newer implementation via hardware" ? Can you be very specific
about what you're referring to ?

-- 
Richard Braun



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
I've said It yet.

> As this
> form, we don't need to know how many cores has the processor and set the
> core number in Mach in compilation time. Instead, the same processor will
> detect the cores number and configure SMP automatically.

I don't know the exact assembly instructions, but I read about the
processor can be configured from assembly to run in multicore mode.
Then, what we had to do is to write a routine that initializes the
processor with this multicore support, during Mach boot.

In this guide, in Chapter 8.4 feels to be a better explanation about how to
do this (initialization example in 8.4.4):
https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html






El jue., 30 ago. 2018 a las 17:35, Richard Braun ()
escribió:

> On Thu, Aug 30, 2018 at 05:32:40PM +0200, Almudena Garcia wrote:
> > Excuse me, It's a little offtopic.
> >
> > I was talking about implement SMP via hardware in Hurd (Mach really). In
> > this implementation, Mach configures the processor during the boot,
> > enabling multicore support. (All Pentium 4 or modern x86 processor
> supports
> > this)
> >
> > In the current SMP support, this multicore support feels been build from
> > software, generating the threads and assigning It to the processor from
> > software. Then, my idea is to start a project to change this SMP software
> > to a newer implementation via hardware, as I previously said.  As this
> > form, we don't need to know how many cores has the processor and set the
> > core number in Mach in compilation time. Instead, the same processor will
> > detect the cores number and configure SMP automatically.
> >
> > https://c9x.me/x86/html/file_module_x86_id_45.html
> >
> >
> https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html
>
> What is "a newer implementation via hardware" ? Can you be very specific
> about what you're referring to ?
>
> --
> Richard Braun
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
Excuse me, It's a little offtopic.

I was talking about implement SMP via hardware in Hurd (Mach really). In
this implementation, Mach configures the processor during the boot,
enabling multicore support. (All Pentium 4 or modern x86 processor supports
this)

In the current SMP support, this multicore support feels been build from
software, generating the threads and assigning It to the processor from
software. Then, my idea is to start a project to change this SMP software
to a newer implementation via hardware, as I previously said.  As this
form, we don't need to know how many cores has the processor and set the
core number in Mach in compilation time. Instead, the same processor will
detect the cores number and configure SMP automatically.

https://c9x.me/x86/html/file_module_x86_id_45.html

https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html

This can be an interesting project, and could to be a good improvement to
the Hurd.




El jue., 30 ago. 2018 a las 17:01, Richard Braun ()
escribió:

> On Thu, Aug 30, 2018 at 04:52:28PM +0200, Almudena Garcia wrote:
> > > But this solution would be specific to Intel chips?  ie: this method of
> > > SMP wouldn't work on AMD or POWER right
> >
> > All x86 architecture, I think
>
> What on Earth are you talking about ?
>
> --
> Richard Braun
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Richard Braun
On Thu, Aug 30, 2018 at 04:52:28PM +0200, Almudena Garcia wrote:
> > But this solution would be specific to Intel chips?  ie: this method of
> > SMP wouldn't work on AMD or POWER right
> 
> All x86 architecture, I think

What on Earth are you talking about ?

-- 
Richard Braun



Re: How do I learn the Hurd stuff?

2018-08-30 Thread Almudena Garcia
>
>
> But this solution would be specific to Intel chips?  ie: this method of
> SMP wouldn't work on AMD or POWER right


All x86 architecture, I think

El jue., 30 ago. 2018 a las 15:09, Joshua Branson ()
escribió:

> Almudena Garcia  writes:
>
> > Hi:
> >
> >  Also how does one implement SMP via hardware and NOT software?  Is this
> >  a portable approach to do SMP?  Will this approach allow SMP on Intel,
> >  AMD, ARM, POWER, and RISC chips?
> >
> > I'm reading about Intel processor can be configured to run in multicore
> mode. I don't know how can I do It yet, but this can be more efficient than
> a software
> > implementation and may solve many concurrency problems.
>
> But this solution would be specific to Intel chips?  ie: this method of
> SMP wouldn't work on AMD or POWER right?
>
> >
> >
> >
> > El mié., 29 ago. 2018 a las 22:56, Joshua Branson ()
> escribió:
> >
> >  Almudena Garcia  writes:
> >
> >  > Hi all:
> >  >
> >  > I'm reading about you're interested in contributing with Hurd and
> practice with C.
> >  >
> >  > I have an interesting project, about implement SMP support in Hurd.
> Currently, Mach has a little support to multiprocessing, but this is old
> and very
> >  buggy.
> >  >
> >  > A friend has said me that It's possible to implement SMP support via
> hardware, instead use software techniques, and I would try this project.
> >  >
> >  > If any person can tutorize me and contribute, I will be grateful.
> >  >
> >
> >  I can probably encourage you for this project, but I'm not sure if I'd
> >  be able to help very well.  I'm still on the struggle bus with the Hurd
> >  development.  I have a ever growing Hurd cheatsheet, but I am no CS
> >  major.
> >
> >  Also how does one implement SMP via hardware and NOT software?  Is this
> >  a portable approach to do SMP?  Will this approach allow SMP on Intel,
> >  AMD, ARM, POWER, and RISC chips?
> >
> >  Honestly, I could probably just spend some time trying to update the
> >  Hurd wiki.  A lot of places just need some documentation updates.  Like
> >  a lot. hahaha.
>
>


Re: How do I learn the Hurd stuff?

2018-08-30 Thread Joshua Branson
Almudena Garcia  writes:

> Hi:
>
>  Also how does one implement SMP via hardware and NOT software?  Is this
>  a portable approach to do SMP?  Will this approach allow SMP on Intel,
>  AMD, ARM, POWER, and RISC chips?
>
> I'm reading about Intel processor can be configured to run in multicore mode. 
> I don't know how can I do It yet, but this can be more efficient than a 
> software
> implementation and may solve many concurrency problems.

But this solution would be specific to Intel chips?  ie: this method of
SMP wouldn't work on AMD or POWER right?

>
>   
>
> El mié., 29 ago. 2018 a las 22:56, Joshua Branson () 
> escribió:
>
>  Almudena Garcia  writes:
>
>  > Hi all:
>  >
>  > I'm reading about you're interested in contributing with Hurd and practice 
> with C.
>  >
>  > I have an interesting project, about implement SMP support in Hurd. 
> Currently, Mach has a little support to multiprocessing, but this is old and 
> very
>  buggy.
>  >
>  > A friend has said me that It's possible to implement SMP support via 
> hardware, instead use software techniques, and I would try this project.
>  >
>  > If any person can tutorize me and contribute, I will be grateful.
>  >
>
>  I can probably encourage you for this project, but I'm not sure if I'd
>  be able to help very well.  I'm still on the struggle bus with the Hurd
>  development.  I have a ever growing Hurd cheatsheet, but I am no CS
>  major.
>
>  Also how does one implement SMP via hardware and NOT software?  Is this
>  a portable approach to do SMP?  Will this approach allow SMP on Intel,
>  AMD, ARM, POWER, and RISC chips?
>
>  Honestly, I could probably just spend some time trying to update the
>  Hurd wiki.  A lot of places just need some documentation updates.  Like
>  a lot. hahaha.



Re: How do I learn the Hurd stuff?

2018-08-29 Thread Almudena Garcia
Hi:

Also how does one implement SMP via hardware and NOT software?  Is this
> a portable approach to do SMP?  Will this approach allow SMP on Intel,
> AMD, ARM, POWER, and RISC chips?
>

I'm reading about Intel processor can be configured to run in multicore
mode. I don't know how can I do It yet, but this can be more efficient than
a software implementation and may solve many concurrency problems.



El mié., 29 ago. 2018 a las 22:56, Joshua Branson ()
escribió:

> Almudena Garcia  writes:
>
> > Hi all:
> >
> > I'm reading about you're interested in contributing with Hurd and
> practice with C.
> >
> > I have an interesting project, about implement SMP support in Hurd.
> Currently, Mach has a little support to multiprocessing, but this is old
> and very buggy.
> >
> > A friend has said me that It's possible to implement SMP support via
> hardware, instead use software techniques, and I would try this project.
> >
> > If any person can tutorize me and contribute, I will be grateful.
> >
>
> I can probably encourage you for this project, but I'm not sure if I'd
> be able to help very well.  I'm still on the struggle bus with the Hurd
> development.  I have a ever growing Hurd cheatsheet, but I am no CS
> major.
>
> Also how does one implement SMP via hardware and NOT software?  Is this
> a portable approach to do SMP?  Will this approach allow SMP on Intel,
> AMD, ARM, POWER, and RISC chips?
>
> Honestly, I could probably just spend some time trying to update the
> Hurd wiki.  A lot of places just need some documentation updates.  Like
> a lot. hahaha.
>
>


Re: How do I learn the Hurd stuff?

2018-08-29 Thread Joshua Branson
Joan Lledó  writes:

> Missatge de Svante Signell  del dia dg., 26
> d’ag. 2018 a les 19:52:
>> I've read your blog from your GSoC project. Nice reading indeed. Since
>> more developments have been made by you and others after that, do you
>> think you could add a follow-up of that blog to reach current status of
>> lwip for Hurd?
>
> Mmm, I'm not sure re-opening that blog is a good idea, since it was
> created for a particular purpose which is already finished. But the
> main reason is I don't have the energy for writing again and don't see
> myself maintaining the blog in the long term :).

That makes sense.  Can we trouble you for a teaser update on the mailing
list?  Braunr seems to think that you were one of the best GSoC people
that the Hurd has had.  It sounded like your lwip branch could
completely replace the pfinet code.



Re: How do I learn the Hurd stuff?

2018-08-29 Thread Joshua Branson
Almudena Garcia  writes:

> Hi all:
>
> I'm reading about you're interested in contributing with Hurd and practice 
> with C.
>
> I have an interesting project, about implement SMP support in Hurd. 
> Currently, Mach has a little support to multiprocessing, but this is old and 
> very buggy.
>
> A friend has said me that It's possible to implement SMP support via 
> hardware, instead use software techniques, and I would try this project.
>
> If any person can tutorize me and contribute, I will be grateful.
>

I can probably encourage you for this project, but I'm not sure if I'd
be able to help very well.  I'm still on the struggle bus with the Hurd
development.  I have a ever growing Hurd cheatsheet, but I am no CS
major.

Also how does one implement SMP via hardware and NOT software?  Is this
a portable approach to do SMP?  Will this approach allow SMP on Intel,
AMD, ARM, POWER, and RISC chips?

Honestly, I could probably just spend some time trying to update the
Hurd wiki.  A lot of places just need some documentation updates.  Like
a lot. hahaha.



Re: How do I learn the Hurd stuff?

2018-08-26 Thread Joan Lledó
Missatge de Svante Signell  del dia dg., 26
d’ag. 2018 a les 19:52:
> I've read your blog from your GSoC project. Nice reading indeed. Since
> more developments have been made by you and others after that, do you
> think you could add a follow-up of that blog to reach current status of
> lwip for Hurd?

Mmm, I'm not sure re-opening that blog is a good idea, since it was
created for a particular purpose which is already finished. But the
main reason is I don't have the energy for writing again and don't see
myself maintaining the blog in the long term :).



Re: How do I learn the Hurd stuff?

2018-08-26 Thread Almudena Garcia
Hi all:

I'm reading about you're interested in contributing with Hurd and practice
with C.

I have an interesting project, about implement SMP support in Hurd.
Currently, Mach has a little support to multiprocessing, but this is old
and very buggy.

A friend has said me that It's possible to implement SMP support via
hardware, instead use software techniques, and I would try this project.

If any person can tutorize me and contribute, I will be grateful.



El dom., 26 ago. 2018 a las 20:18, Joshua Branson ()
escribió:

> Joan Lledó  writes:
>
> > Missatge de Joshua Branson  del dia ds., 25
> > d’ag. 2018 a les 19:09:
> >> Is there something else I could be doing?
> >
> > It could be worth to take a look at my GSOC blog, it may help you:
> > http://darnassus.sceen.net/~jlledom/en/index.html
>
> Thanks!
>
>


Re: How do I learn the Hurd stuff?

2018-08-26 Thread Joshua Branson
Richard Braun  writes:

> On Sat, Aug 25, 2018 at 01:20:55PM -0400, Joshua Branson wrote:
>> Is there something else I could be doing?  How much time should I try to
>> devote to this a week?  With 1 hour a day get me somewhere in 6 months?
>> Or should I be spending more like 2 hours a day?
>
> You should like what you're doing, and set yourself real-world goals
> like developing a project doing something that actually interests you.

At the moment it would be cool to write GNU/Hurd translators in guile.
Since guile is designed to work with C code, this might be a cool goal
to get to.



Re: How do I learn the Hurd stuff?

2018-08-26 Thread Joshua Branson
Joan Lledó  writes:

> Missatge de Joshua Branson  del dia ds., 25
> d’ag. 2018 a les 19:09:
>> Is there something else I could be doing?
>
> It could be worth to take a look at my GSOC blog, it may help you:
> http://darnassus.sceen.net/~jlledom/en/index.html

Thanks!



Re: How do I learn the Hurd stuff?

2018-08-26 Thread Svante Signell
On Sun, 2018-08-26 at 10:40 +0200, Joan Lledó wrote:
> Missatge de Joshua Branson  del dia ds., 25
> d’ag. 2018 a les 19:09:
> > Is there something else I could be doing?
> 
> It could be worth to take a look at my GSOC blog, it may help you:
> http://darnassus.sceen.net/~jlledom/en/index.html

Hi Joan,

I've read your blog from your GSoC project. Nice reading indeed. Since
more developments have been made by you and others after that, do you
think you could add a follow-up of that blog to reach current status of
lwip for Hurd?

Thanks!



Re: How do I learn the Hurd stuff?

2018-08-26 Thread Joan Lledó
Missatge de Joshua Branson  del dia ds., 25
d’ag. 2018 a les 19:09:
> Is there something else I could be doing?

It could be worth to take a look at my GSOC blog, it may help you:
http://darnassus.sceen.net/~jlledom/en/index.html



Re: How do I learn the Hurd stuff?

2018-08-25 Thread Richard Braun
On Sat, Aug 25, 2018 at 01:20:55PM -0400, Joshua Branson wrote:
> Is there something else I could be doing?  How much time should I try to
> devote to this a week?  With 1 hour a day get me somewhere in 6 months?
> Or should I be spending more like 2 hours a day?

You should like what you're doing, and set yourself real-world goals
like developing a project doing something that actually interests you.

-- 
Richard Braun



How do I learn the Hurd stuff?

2018-08-25 Thread Joshua Branson


Hello, for the past few weeks, I've been coding for an hour a day in C.
I don't know that I have much to show for it yet, but I am making some
progress.  My eventual goal is to be something resembling a decent hurd
developer.  Does anyone have any tips for how to do this?

I'm building up a C reference guide, a hurd reference guide.  I'm
reading through the C programming language book.  I've downloaded an
operating systems concepts book.  I could probably go to a local hacker
club at the local college.  They have a special interest group for
operating systems.

Is there something else I could be doing?  How much time should I try to
devote to this a week?  With 1 hour a day get me somewhere in 6 months?
Or should I be spending more like 2 hours a day?

Thanks,

Joshua