Re: difference between DECLARE_* and DEFINE_* macro namespaces ?

2022-09-26 Thread Rik van Riel
On Wed, 2022-09-21 at 13:33 -0600, jim.cro...@gmail.com wrote:
> difference between DECLARE_* and DEFINE_* macro namespaces ?

I am not sure there is a clear difference any more nowadays.

Both DECLARE_* and DEFINE_* seem to be used for both defining
a type and declaring an (often initialized) instance of that type.

For example, DEFINE_SPINLOCK creates an unlocked spinlock:

#define DEFINE_SPINLOCK(x)  spinlock_t x = __SPIN_LOCK_UNLOCKED(x)

Meanwhile, DECLARE_RWSEM does the exact same thing, but for
the rw_semaphore:

#define DECLARE_RWSEM(name) \
struct rw_semaphore name = __RWSEM_INITIALIZER(name)

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


mail server issues fixed?

2022-09-02 Thread Rik van Riel
Hello,

it looks like a security update removed some compatibility
with older mail server config settings, and email here broke
for a couple of days.

Just enough spam and system mail made it through that I didn't
notice until today. Things should be fixed again now.

Apologies for the inconvenience.

Rik
-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to free a page table page

2021-04-05 Thread Rik van Riel
On Tue, 2021-04-06 at 00:39 +0900, Wonkyo Choe wrote:

> 1. In x86, are all page-table pages released at the end of
> termination
> by using free_pgtables()?
> 2. In x86, a page-table page can be freed when there is no entry? In
> other words, does the Linux kernel
> release a page-table page on runtime? If so, what function would do
> this kind of task?

At munmap time, as well as exit and execve time, page
tables can get freed. Look at the code between sys_munmap()
and zap_page_range().

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: get_user_pages and pinning

2021-01-03 Thread Rik van Riel
On Sun, 2021-01-03 at 12:54 -0500, Sadanand Warrier wrote:
> 
> So the question is what should happen if the memory isn't actually
> allocated. Should get_user_pages check?
> It doesn't seem to be doing so.  Can it?

If the driver needs the memory to be allocated, why not
use the FOLL_POPULATE flag when calling get_user_pages?

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: [Scheduler] CFS - What happens to each task's slice if nr_running * min_granularity > sched_latency?

2020-04-06 Thread Rik van Riel
On Thu, 2020-04-02 at 22:10 -0400, Evan T Mesterhazy wrote:

> Here's the code for calculating an individual process's slice. It
> looks like the weighting formula is used here regardless of whether
> the period has been expanded.
> If that's the case, doesn't that mean that some processes will still
> get a slice that's smaller than the min_granularity?

That is exactly what will happen. You figured out what
the code does.

Generally this behavior is not a real problem, since
people expect low priority tasks to run slower.

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Best way to debug an invalid opcode

2020-03-19 Thread Rik van Riel
On Thu, 2020-03-19 at 10:22 +0100, Karaoui mohamed lamine wrote:
> Hi list,
> 
> I am currently encountering a kernel oops that indicate an "invalid
> opcode:  [#1] SMP"
> 
> I am working on this project https://github.com/GiantVM/Linux-DSM
> 
> The full log of the bug can be found here: 
> https://github.com/GiantVM/Linux-DSM/pull/3 (at the end)
> 
> Here is a snippet of the log:
> [  107.980285] [ cut here ]
> [  107.980995] kernel BUG at arch/x86/kvm/dsm-util.c:214!

Why don't you look at the code?

https://github.com/GiantVM/Linux-DSM/blob/master/arch/x86/kvm/dsm-util.c#L214

This bug is in the DSM code itself. You'll have to figure
out why xbzrle_decode_buffer is returning a negative value.

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Introduction & Query on Newbie Website Status

2020-02-03 Thread Rik van Riel
On Mon, 2020-02-03 at 19:49 +, Jack Winch wrote:
> > The web site seems to be up now, without me having
> > made any changes at all. Were you getting timeouts
> > (routing issues?) or web server errors? 
> >  
> 
> Using the Chrome browser, I was getting various errors relating to
> DNS.  But, the problem appears to be intermittent and is happening 
> on my work device in the office and on my personal computer at home. 
> This evening it appears to be working from home, but not the office. 
> If I get the issue again, I shall undertake some further
> investigation.  At home, I make use of the public Google DNS servers
> and the DNS server at work is setup to forward to these servers
> also.  When I was having issues on my personal computer (i.e., when I
> originally posted to the mailing list), clearing the DNS cache of
> both my computer and the modem-router had no effect, leaving me
> unable to access the website.  However, today, it appears I can
> access the site from home.

It could well be a time of day thing. When I looked earlier,
some spammers were trying to create multiple wiki accounts
a second, slowing the site to a crawl due to the way MoinMoin
stores user data.

The accounts themselves are useless without the ability to
make any edits, but I assume they must be making a little
bit of money selling (useless) account credentials...

Over 50,000 accounts created just in the past week, on just
one of the wikis. With MoinMoin 1.9 essentially dead, and
the next development version quite moribund, I think it is
time for me to move to another wiki, where the worst case for
lookups is O(log(N)), not O(N). Maybe Dokuwiki.

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Introduction & Query on Newbie Website Status

2020-02-02 Thread Rik van Riel
On Sun, 2020-02-02 at 23:26 +, Anuz Pratap Singh Tomar wrote:
> 
> 
>
> >  
> > Lastly, the Kernel Newbies website seems to be unavailable at the
> > moment (Google last cached the site on 31 Jan 2020 01:49:1 UTC). 
> > Any
> > idea when it will be available again?
> > 
> 
> Rik maintains the website, I think. 
> ccing him for an answer. 

The web site seems to be up now, without me having
made any changes at all. Were you getting timeouts
(routing issues?) or web server errors?

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Try/catch for modules?

2019-10-18 Thread Rik van Riel
On Fri, 2019-10-18 at 12:43 -0300, Martin Galvan wrote:
> El jue., 17 oct. 2019 a las 19:13, Valdis Klētnieks
> () escribió:
> > For starters, the *correct* in-kernel way to deal with this is:
> > if (!ptr) {
> > printk("You blew it!\n");
> > goto you_blew_it;
> > }
> 
> goto statements are harmful. In any case, what I meant was to have
> some sort of safety net to prevent exceptions (i.e. if I screw up and
> forget a NULL check) from panicking the system.

https://koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code/

> > Also, "current PID" and "my module" aren't two things that can
> > correspond
> 
> I don't understand what you mean by that. Module code (e.g. an ioctl)
> runs as some process. In the case of an ioctl, I'd assume it's the
> same PID of the user process.

Every time you test whether the PID is the PID of the
currently running process, it will be true. Think of
the kernel as a privileged shared library, not as a
program that userspace happens to communicate with.

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Software Prefetching using Machine learning

2019-10-10 Thread Rik van Riel
On Thu, 2019-10-10 at 11:10 +0900, Irfan Ullah (울라 이르판) wrote:
> Thank you  for the responses.
> It is not my assignment. Actually, we have initiated a project based
> on the idea "incorporating artificial intelligence in the linux
> kernel to increase its performance". 

That is an interesting idea, but it is worth keeping in
mind that most "kernel performance" is not about how well
the kernel does something, but about how quickly the kernel
lets userland programs do things.

For example, I have done a lot of work on the scheduler
code recently, and the most common thing I see (whenever
I try something wrong) is for total CPU use in the system
to go up. However, the increase in CPU time used is often
in user space, and not in the kernel.

For example, trying out a bad idea might result in 0.2%
more CPU time spent in the kernel, but 2% more CPU time
spent in user space, due to seeing a larger number of
cache misses from user space programs.

When things are done right, enabling a certain kernel
feature might result in some overhead (say 0.3%), which
is almost entirely caused by cache line misses, resulting
in a total system overhead of twice that (0.6%), because
every cache miss in my code results in something else
getting evicted from the cache, and somebody else incurring
a cache miss as well.

In short, if you want to use machine learning to improve
kernel performance, you need to figure out a way to do
that without causing cache misses in any really hot path.

That puts a serious constraint on what you can do.

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: vmalloc_to_page is contiguous ?

2019-03-18 Thread Rik van Riel
On Mon, 2019-03-18 at 12:55 +0200, Ranran wrote:
> Hello,
> 
> Does vmalloc_to_page() returns contiguous physical memory ?
> I ask becuase I see that its return value is used for DMA and DMA
> uses
> contiguous memory.
> see here:
> 
https://elixir.bootlin.com/linux/latest/source/drivers/mtd/nand/onenand/samsung.c#L657
> Yet, in vmalloc_to_page implementation:
> https://elixir.bootlin.com/linux/v4.5/source/mm/vmalloc.c#L234
> it does not seem that it creates a contiguous allocation.

That is correct, vmalloc_to_page does not create anything.

All it does is find (and return) the page address of
a single vmalloc address.

If you have a vmalloc buffer larger than PAGE_SIZE, you
will have to call vmalloc_to_page to find each individual
page.

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: First Patch: Memory Limit Exceeded

2018-08-26 Thread Rik van Riel
On Sun, 2018-08-26 at 20:14 +0530, Anika Murarka wrote:
> Hi,
> I am Anika , and I have been trying to submit my first patch for
> Linux Kernel. 
> I had completed till the make command and rebooted my vm after that.
> While rebooting the following message popped :- " End kernel panic
> not syncing out of memory and no killable processes" . I tried the
> whole procedure again , yet again same error occurred. Please let me
> know what can be done.

The first thing you should do is look through the
entire backtrace that was printed before that
"End kernel panic" message, to see exactly where
in your code changes the problem is happening.

-- 
All Rights Reversed.


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to change page permission from inside the kernel?

2018-07-06 Thread Rik van Riel
On Fri, 2018-07-06 at 21:29 +0200, Ahmed Soliman wrote:

> > 2) And why from inside the kernel?
> 
> Because this needs to be done from inside KVM.
> 
> Note: I am aware that this won't be effective against rootkits that
> live in userspace, rootkits that target kernel dynamic data, files on
> disk, as well as VMM escapes, but I believe if the attack surface is
> reduced by just a little bit, it is not that bad, so please lets not
> discuss that :P.

It sounds like the only permission you care about is
the permission of the _guest_ writing to that memory,
not the permission of the qemu-kvm userspace program
writing to that memory.

You may be looking at the wrong page mapping to
manipulate.

-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: wiki & email upgrades

2018-01-03 Thread Rik van Riel
I would be happy to add you to the EditorsGroup for
tr.kernelnewbies.org

What is your account name on tr.kernelnewbies.org?

On 1/2/18, 7:42 AM, "Ozgur" <oz...@goosey.org> wrote:



02.01.2018, 18:34, "Jalus Bilieyich" <countola...@gmail.com>:
    > On 01/01/2018 12:44 PM, Rik van Riel wrote:
>>  Hello,
>>

Hello,

everytime upgrading is good but I think the old version looked nice, new 
year new front-side. 
So, happy new year.

>>  As you may have noticed (if you weren't too busy celebrating the
>>  holidays), I have upgraded kernelnewbies.org to a new version of
>>  the wiki, and am also upgrading the email system.
>>
>>  This email is both an announcement, and a test of the new email
>>  configuration. If you notice lingering problems, please contact
>>  me via email (if it works) or Facebook Messenger.
>>

I can seen a many functions is work. I think TR page need some translation, 
can I help?

https://tr.kernelnewbies.org/

:)

Ozgur

>>  kind regards,
>>
>>  Rik

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies










___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: wiki & email upgrades - archives

2018-01-03 Thread Rik van Riel
The archives seem to be working here. I suspect you ran into some

kind of temporary failure, and I will try to figure out what it is if

it happens again ☺

 

From: inventsekar <inventse...@gmail.com>
Date: Tuesday, January 2, 2018 at 9:08 AM
To: <kernelnewbies@kernelnewbies.org>
Subject: Re: wiki & email upgrades - archives

 

Hi Rik,

 

>>To see the collection of prior postings to >>the list, visit the 
>>Kernelnewbies Archives.

 

This kernel easiest archives page is not working. Not sure if this related to  
wiki & email upgrades, but just thought to notify you.

 

Best regards

Sekar

 

On Jan 3, 2018 1:00 AM, <kernelnewbies-requ...@kernelnewbies.org> wrote:

Send Kernelnewbies mailing list submissions to
kernelnewbies@kernelnewbies.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
or, via email, send a message with subject or body 'help' to
kernelnewbies-requ...@kernelnewbies.org

You can reach the person managing the list at
kernelnewbies-ow...@kernelnewbies.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Kernelnewbies digest..."


Today's Topics:

   1. (Rik van Riel)
   2. Re: wiki & email upgrades (Jalus Bilieyich)
   3. Re: wiki & email upgrades (Ozgur)


------

Message: 1
Date: Mon, 01 Jan 2018 13:44:17 -0500
From: Rik van Riel <r...@surriel.com>
To: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: wiki & email upgrades
Message-ID: <1514832257.6619.62.ca...@surriel.com>
Content-Type: text/plain; charset="utf-8"

Hello,

As you may have noticed (if you weren't too busy celebrating the
holidays), I have upgraded kernelnewbies.org to a new version of
the wiki, and am also upgrading the email system.

This email is both an announcement, and a test of the new email
configuration. If you notice lingering problems, please contact
me via email (if it works) or Facebook Messenger.

kind regards,

Rik
--
All Rights Reversed.
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180101/43905ce9/attachment-0001.sig>

--

Message: 2
Date: Tue, 2 Jan 2018 09:34:20 -0600
From: Jalus Bilieyich <countola...@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: Re: wiki & email upgrades
Message-ID: <a5464f8c-70e0-129e-3749-53160a1ff...@gmail.com>
Content-Type: text/plain; charset="utf-8"

On 01/01/2018 12:44 PM, Rik van Riel wrote:
> Hello,
>
> As you may have noticed (if you weren't too busy celebrating the
> holidays), I have upgraded kernelnewbies.org to a new version of
> the wiki, and am also upgrading the email system.
>
> This email is both an announcement, and a test of the new email
> configuration. If you notice lingering problems, please contact
> me via email (if it works) or Facebook Messenger.
>
> kind regards,
>
> Rik
>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

It works. :)

-JB

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: 
<http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180102/bc99553c/attachment-0001.sig>

--

Message: 3
Date: Tue, 02 Jan 2018 18:42:31 +0300
From: Ozgur <oz...@goosey.org>
To: Jalus Bilieyich <countola...@gmail.com>,
"kernelnewbies@kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
Subject: Re: wiki & email upgrades
Message-ID: <3088751514907...@web10j.yandex.ru>
Content-Type: text/plain; charset=utf-8



02.01.2018, 18:34, "Jalus Bilieyich" <countola...@gmail.com>:
> On 01/01/2018 12:44 PM, Rik van Riel wrote:
>> ?Hello,
>>

Hello,

everytime upgrading is good but I think the old version looked nice, new year 
new front-side.
So, happy new year.

>> ?As you may have noticed (if you weren't too busy celebrating the
>> ?holidays), I have upgraded kernelnewbies.org to a new version of
>> ?the wiki, and am also upgrading the email system.
>>
>> ?This email is both an announcement, and a test of the new email
>> ?configuration. If you notice lingering problems, please contact
>> ?me via email (if it works) or Facebook Messenger.
>>

I can seen a many fu

wiki & email upgrades

2018-01-01 Thread Rik van Riel
Hello,

As you may have noticed (if you weren't too busy celebrating the
holidays), I have upgraded kernelnewbies.org to a new version of
the wiki, and am also upgrading the email system.

This email is both an announcement, and a test of the new email
configuration. If you notice lingering problems, please contact
me via email (if it works) or Facebook Messenger.

kind regards,

Rik
-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Device driver over network

2017-12-18 Thread Rik van Riel
On Mon, 2017-12-18 at 16:30 -0500, Max Ruttenberg wrote:
> Hi all,
> 
> I have two compute nodes on a machine that are both running embedded
> Linux. The nodes are connected to each other over Ethernet.
> 
> The both have an i2c bus. Node A has a thermal sensor. Node B has
> three fans.
> 
> Right now I have a user space application running on node B that uses
> ssh to read from node A's thermal sensor and then adjust the fan
> speeds accordingly. I am wondering if there's away instead to have a
> hwmon driver running on Node B for the thermal monitor running on
> node
> A. This way I could get rid of the user space application and replace
> it with something a little bit more standard like thermald.
> 
> Is this something that people have done? Maybe if not this
> specifically, how about a driver for a device over the network?

The "standard" way of doing something like this seems to be to
have a daemon on node A, which forwards data to a daemon on node
B, which pretends to be a bus on node B.

Look at the fuse user space file system for an example of this.

-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel schedules kernel tasks on isolated cpus, SCHED_FIFO prevents kernel tasks from running

2017-06-28 Thread Rik van Riel
On Wed, 2017-06-28 at 08:39 -0500, Andrei Hurynovich wrote:
> Hi.
> 
> We are trying to build realtime(-ish) system based on rhel6(kernel 
> 2.6.32-642.1.1.el6.x86_64).
> 
> We used isolcpus to remove some cpus from process 
> scheduling(isolcpus=2-19 nohz_full=2-19 rcu_nocbs=2-19).
> 
> We spin off a program thread that set's its cpu affinity to one of
> those 
> isolated cpus, sets its scheduling chass to SCHED_FIFO, spins in a
> loop 
> and never sched_yield()-s to the kernel.
> 
> We set sysctl kernel.sched_rt_runtime_us = -1 so realtime threads
> are 
> NEVER interrupted.

You want an actual realtime kernel for that to work
right. The real time kernel currently supported by
Red Hat is 3.10 based, not 2.6.32 based.

-- 
All rights reversed

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: sched_wakeup_granularity_ns in CFS correctly designed or not?

2017-06-11 Thread Rik van Riel
On Sun, 2017-06-11 at 22:26 +0530, Rohith R wrote:
> > OK, let me get this straight:
> > 1) Your application has a deadline.
> > 2) You do not tell the kernel of that deadline.
> > 3) You want to know if the kernel will keep the
> >    promise you never told it about?
> 
>  
> Yes. All I am saying is that by keeping a
>  sched_wakeup_granularity_ns parameter as 2.5 ms. A process which is
> waken up has to wait for that much amount of time if any other (non-
> important) process is executing. Now I am saying that the way CFS
> seems to be designed it will never make a process which wakes up and
> has a deadline < 2.5 ms meet its deadline.
> 
> Now why does this scenario matter. This may occur in real workloads
> like video processing etc.

How much video processing?

If the amount of computation time is 3ms, that means
the video processing program needs to program its
wakeup time at least 3ms before the time it needs to
have the data ready.

There will likely be some buffering involved, too, so
it can safely move its deadline a little further, and
have time to spare.

When the system is overloaded, the video processing
program may not get as much CPU time as it needs, but
on a system that is not overloaded, chances are it
will be fine.

If you need a guarantee, use SCHED_DEADLINE.

-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: sched_wakeup_granularity_ns in CFS correctly designed or not?

2017-06-11 Thread Rik van Riel
On Sun, 2017-06-11 at 21:38 +0530, Rohith R wrote:
> Sure, CFS does not have any deadlines at all. But I am trying to
> measure its performance w.r.t to some workloads having some periods
> and deadlines. So in that case will the tasks having deadline of <
> 2.5 ms always miss the deadline ?

OK, let me get this straight:
1) Your application has a deadline.
2) You do not tell the kernel of that deadline.
3) You want to know if the kernel will keep the
   promise you never told it about?

Is that really your question?

-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: sched_wakeup_granularity_ns in CFS correctly designed or not?

2017-06-11 Thread Rik van Riel
On Sun, 2017-06-11 at 11:15 +0530, Rohith R wrote:
> Hi,
> 
> I was working on the Linux CFS scheduler and came across this
> tuneable parameter called `sched_wakeup_granularity_ns`. The use of
> this goes as follows as described in [this paper](http://rouskas.csc.
> ncsu.edu/Publications/Conferences/ICC-SPS-2015.pdf).
> 
> > This parameter controls the wake-up latency of a task, i.e., the
> amount of time it must lapse before it can preempt the current task.
> 
> Further looking up on this parameter from [here](https://www.systutor
> ials.com/239998/sched_min_granularity_ns-sched_latency_ns-cfs-affect-
> timeslice-processes/) :
> 
> > If the difference between the virtual run time of current running
> process and the virtual run time of preempting process is bigger than
> the virtual run time of sched_wakeup_granularity_ns (here, transfer
> sched_wakeup_granularity_ns to a virtual run time with preempting
> process’s weight), the preemption happens.
> 
> The default value of this in my system is 2.5 milli seconds.
> 
> My question : If a process with a deadline <= 2.5 ms comes at time
> another low priority process is executing then, it won't get its
> chance to execute because of this minimum granularity and will always
> miss its deadline.
> 
> Am I right in my claim ? Why is the Linux kernel designed like that ?

CFS does not have deadlines at all. You may be
confusing the CFS scheduler and the deadline scheduler.

The wakeup granularity in CFS is used to determine
whether or not the scheduler should bother preempting
the currently running task if a higher priority task
becomes runnable.

If the remaining amount of time in the currently running
task's time slice is small, we are better off letting
it run until the end of its time slice, before scheduling
in the newly woken task.

> Of course we can set this parameter to 0 ms and re-compile the
> kernel, but don't tasks with deadlines of 2.5 ms occur frequently in
> day to day life ? Video decoders, sound processing apps, and other
> latency critical workloads ?

Why recompile the kernel, when you can tune the value
through /proc/sys/kernel/sched_wakeup_granularity_ns ?

-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Is vnode number also limit system-wide number of open file?

2017-05-31 Thread Rik van Riel
On Wed, 2017-05-31 at 21:37 +0800, Yubin Ruan wrote:
> I notice that there is a 
> 
>   unsigned long   i_ino;
> 
> in definition of `struct inode' [1], which is the virtual filesystem
> inode.
> Does that mean "inode number" and is it used for indexing in the
> system-wide
> inode table? 
> 
> If that is the case, would that limit the number of open file in
> Linux?

Those numbers are unrelated.

The i_ino number is the inode number within each
filesystem, and different filesystems can have
inodes with the same inode numbers.

File descriptors (open files) point to a struct inode
somewhere in memory. The same file can be opened many
times (all programs opening libc.so). Many files will
not be opened by any program at all.

-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: [mm subsystem] A question about function page_table_range_init_count()

2017-03-21 Thread Rik van Riel
On Wed, 2017-03-15 at 22:12 +0800, Hao Lee wrote:
> Hi, all
> 
> I encounter a problem when I read the source code of kernel 4.9.9.
> 
> In arch/x86/mm/init_32.c, at line 125 [1], there is a function named
> page_table_range_init_count(...). I have analyzed some codes and find
> its two parameters are PKMAP_BASE and FIXADDR_START.
> 
> Between Line 141 and Line 150, there is a for loop and I don't know
> what it means, especially Line 144-Line147.
> 
> Could someone can give me some tips. Thanks a lot!
> 
The code iterates over the virtual memory addresses
specified, and counts the number of pmds (second level
page tables) that will be needed to map that address
space.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: linux-mm mailing list

2017-01-06 Thread Rik van Riel
On Fri, 2017-01-06 at 16:19 +0100, Johannes Thoma wrote:
> Hi Kernel hackers,
> 
> I have a proposal for an improvement of the CMA allocator (just about
> 5 
> lines of code to make it more robust). I would like to send it to
> the linux-mm mailing list (linux...@kvack.org according to
> MAINTAINERS),
> but it seems to be inactive.

That list is not inactive. You may have encountered a list
archive that is no longer receiving updates, but the mailing
list itself is active.

However, it is so active that CCing the maintainers is still
a good idea :)

-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Is kernel Bugzilla a good way to start?

2016-12-22 Thread Rik van Riel
On Thu, 2016-12-22 at 19:21 +0300, Dennis Semakin wrote:
> 
> Hi everybody. 
> I just thought that may be it will be quicker to start to develop for
> kernel.

It can be, but one word of caution.  Sometimes bugs
get fixed independently from the bug report, and the
bug described in the bug report may no longer be
happening in the current kernel.

It would be good to test the bugs people have filed,
to make sure they still exist, before trying to "fix
them again" :)

-- 
All rights reversed


signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Add me to EditorGroup on the wiki?

2016-12-20 Thread Rik van Riel
On Tue, 2016-12-20 at 07:51 +0800, Paul Wise wrote:

> I want to add a link for 4.9 to the DevelopmentStatistics wiki page.
> 
> Could someone approve my account (PaulWise)?

Hi Paul,

I have just added you to the editors group.

Thank you for helping improve the content of our community.

kind regards,

Rik van Riel
-- 
All Rights Reversed.

signature.asc
Description: This is a digitally signed message part
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: userspace app receive SIGSEGV, but not is crash, why?

2016-10-11 Thread Rik van Riel
On Mon, 2016-10-10 at 22:36 +0800, Lucha Chen wrote:
> Dear All,
>   userspace app receive SIGSEGV, but not crash, why?
>   The mtk kernel log is :
> <4>[67330.976640] -(6)[25390:ndroid.systemui][25390:ndroid.systemui]
> sig 11 to [25390:ndroid.systemui] stat=R
> 
The userspace application can tell the kernel
it has a handler for SIGSEGV. If it does that,
the kernel will make sure that the handler is
invoked when SIGSEGV is sent to the process.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Web Forum Registration Failure

2016-10-03 Thread Rik van Riel
On Sun, 2016-08-28 at 23:28 -0600, Jonathan Villatoro wrote:
> On Sun, Aug 28, 2016 at 7:25 PM, n...@nnbits.org 
> wrote:
> > Hello everyone,
> > 
> > I tried to register on Kernelnewbies Web Forum, but got this
> > message:
> > 
> > You did not provide the correct code for the spam
> > prevention check. Please try again.
> > 
> > Would you please help me understand what I was doing wrong? There
> > was no field for spam check and no captcha, only username, email,
> > password, password repeat. I tried two different browsers.
> > 
> > I would appreciate any help or support.
> > 
> > Thank you.
> > 
> > Nick.
> > ___
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
> Hello everyone, I tried to reproduce the error and it does show the
> error upon attempting to create a new profile.
> 
> Screenshot can be found here - http://imgur.com/a/1ZMHn
> 
> FTIW, at least it's reproducible.

It looks like recaptcha.net changed their URL.

I will look into fixing it.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: In SMP system, is there any api to disable IRQ for all CPUs?

2015-10-01 Thread Rik van Riel
On 10/01/2015 11:49 AM, loody wrote:
> hi all:
> is there any kernel API can let IRQ disable for all CPU in SMP system
> for a while?
> I just need it for a experiment on my module.
> 
> such as:
>   --> disable SMP all cpu IRQ
>   OOO   ---> no interrupt happen
>   OOO   ---> no interrupt happen
>   ---> enable SMP all cou IRQ

Look at the code in kernel/stop_machine.c

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to understand processor in SMP and UP?

2015-07-20 Thread Rik van Riel
On 07/19/2015 11:43 PM, Nan Xiao wrote:
 Hi all,
 
 Per my understanding, the processor in SMP and UP should be a
 logic CPU, not a physical CPU. 
 If the physical CPU contains 2 cores, and every core contains 2
 hardware threads, then the processor
 should stands for hardware thread.
 
 Is my understanding right? Thanks very much in advance!

Yes, you are absolutely right, when speaking from a
software point of view.

Each logical processor shows up as a CPU in Linux.

Of course, if you were to talk to somebody installing
physical CPUs in systems, you would get a different
answer :)

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel contributions from organisations and individual privacy

2015-06-15 Thread Rik van Riel
On 06/15/2015 07:08 PM, Jeff Haran wrote:

 Jeff Haran jeff.ha...@citrix.com writes:

 What is the downside to a large company for violating GPL?

 Losing all rights to the software in question forever is probably the largest
 downside.  If we talk about the Linux kernel (as I assume we do in this 
 forum)
 then I have a hard time believing any company can survive that. 
 
 Has this ever actually happened?
 
 Specifically has a company that violated Linux's GPL ever been sued over the 
 violation, lost the case and as a result lost the ability to use the Linux 
 kernel forever?

No, but they have come close, in several lawsuits, mostly in Germany.

All of the companies in question decided that coming into
compliance with the GPL was a better option than losing the
rights to use, copy, distribute, and modify Linux.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel contributions from organisations and individual privacy

2015-06-13 Thread Rik van Riel
On 06/12/2015 07:29 PM, Jeff Haran wrote:

 What is the downside to a large company for violating GPL? They are likely to 
 not get sued in the first place. If they are they can delay using court 
 procedures until they've changed their code to not violate or GPL'ed it. 
 Worst for them is paying legal fees and a contribution. I am guessing those 
 aren't huge, not for a big company. Seems like unless there is some monetary 
 sting like a piece of the proceeds on the sale of violating products, there 
 is no deterrence and you guys will be in court for the rest of time chasing a 
 never ending stream of new violators.

Creating a new kernel for one's product is not as easy as it sounds.

Even replacing the kernel with a BSD kernel, and then replacing the
userland code, and possibly writing a bunch of new device drivers,
is very much non-trivial.

Replacing Linux with something else in a product could easily cost
several millions of dollars.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel contributions from organisations and individual privacy

2015-06-11 Thread Rik van Riel
On 06/11/2015 01:10 AM, Chris Packham wrote:
 It's not a concern for the _employer_ (unless we say something
 particularly inflammatory), in fact the organisation sees the benefit
 of the company name getting out there in technical circles.
 
 It's more a case of the _employee_ not wanting their name to show up
 in mailing list archives, similar to people that don't want a phone
 book listing or twitter/facebook/google+. One option is for someone
 (like me) to do the submission and work with upstream to get the
 change accepted, I don't have a problem with this but it does mean
 that if/when I move on I take the kudos (as well as the criticism)
 with me and the company loses out.

One thing the employees who want to stay anonymous can do
is grant the company copyright on the code (if their
employment agreement doesn't do that already).

Then another employee, who does not mind participating
upstream, can submit the code, with the company name as
copyright on new files added, and their own name in the
Signed-off-by: line of the patches.

At least, I believe this should work...

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel contributions from organisations and individual privacy

2015-06-11 Thread Rik van Riel
On 06/11/2015 07:26 PM, Ruben Safir wrote:

 Not at all.  You have a good point there are definitely legal situations
 other than relicensing which are problematic.
 
 Lets say Apple decides that are going to take the Linux Kernel and
 alter it extensively, in order for it to work with a new hardware platform 
 that they created. And lets say don't return the code base to the public.  
 Now who is going to protect the license and sue them?  You have literaly 
 thousands of partiticpants who have standing now in this case.

That means a thousand possible plaintiffs.

s/Apple/VMware/ and you get this:

http://sfconservancy.org/news/2015/mar/05/vmware-lawsuit/

A number of GPL enforcement projects involving the Linux kernel
have resulted in GPL compliance already.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel contributions from organisations and individual privacy

2015-06-11 Thread Rik van Riel
On 06/11/2015 08:13 PM, Jeff Haran wrote:
 On 06/11/2015 07:26 PM, Ruben Safir wrote:

 Not at all.  You have a good point there are definitely legal
 situations other than relicensing which are problematic.

 Lets say Apple decides that are going to take the Linux Kernel and
 alter it extensively, in order for it to work with a new hardware
 platform that they created. And lets say don't return the code base to the
 public.
 Now who is going to protect the license and sue them?  You have
 literaly thousands of partiticpants who have standing now in this case.

 That means a thousand possible plaintiffs.

 s/Apple/VMware/ and you get this:

 http://sfconservancy.org/news/2015/mar/05/vmware-lawsuit/

 
 I don't see in that web site the amount of damages they are asking for. Maybe 
 I missed it.

They are not asking for damages, but for license compliance.

 Might get more money coming in for the plaintiff's lawyers if instead of 
 asking
 for contributions that yield a tee shirt, it was constructed more like an 
 investment,
 as in X% of total contributions gets the investor X% of (damages - legal 
 fees)
 should they win.

I suspect that is not possible, since not every Linux kernel
copyright holder will want to be part of a lawsuit (of any kind).

The Conservancy is a non-profit. The defendants usually end up
paying the legal costs (and sometimes a contribution for help with
GPL compliance), but starting new actions is something that is
funded by people like us, who care about preserving the GPL license.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Issues with Community

2014-09-17 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/16/2014 07:22 PM, nick wrote:
 After numerous tries at good patches and still failing , I am
 listening to what you guys stated about my patches check it
 applies, grammar and build checks. I am still unable to get a good
 patch and would really appreciate it if someone walks me through
 one good patch as I will learn this will a tutor and the tutor can
 help be my router to the community

There are a lot of useful things to do in the Linux kernel community
besides writing patches.

One of the useful things you could do is simply run linux-next on your
system, and update whenever new linux-next code comes out. If it breaks
(which it sometimes does), you can write a bug report, and learn from
the resulting email thread what caused the problem.

Debugging is a much better way to learn development than developing
new patches from scratch just because...

- -- 
All rights reversed.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUGYkCAAoJEM553pKExN6D6ikH/A2iC8wOm1Xa0rpna+i9cCyu
d3tZof+EbMLezsQjNDXHwJgm7bjsKHT55WT68snliugFueWfkX7c8S48wV2bNso6
iwObDGCt3iXnuNqWrZ4cjJg4Lk3vOWvs3D1FkCEBlhM8lafJZdaaQfXNVLkOAZyt
sg9rypTTeV8e1udp/O2UTNP9jwEasLqU3aGXj5AuTUGI77NiquUDn1fwlTwcregr
nkwv5iCoJuBifm8+GcHHReBzhWX/Ab4d8H+wNGsTHqhlDR3iNyaodMvlHLZcayry
gkZf3+VcZjR9XClBY5yLeNHmRcYeKFm80XeybF3Ih+zxluB5H2jEOKIp9/MbY88=
=S6vR
-END PGP SIGNATURE-

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Checkpatch Patches

2014-09-16 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/16/2014 01:12 PM, Nick Krause wrote:

 I am going to resend my patch and see if it's good and if not I am 
 going to leave for a while.

You may want to consider fixing them, by applying the advice
provided by many people, before resending them.

- -- 
All rights reversed.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUGHMmAAoJEM553pKExN6Dvw4IAKi2no5OpH9TUgcCd5zRHTsb
oqFsZ2xR21bgnIyfM93V+h9QtG+Fuc+WOScCL1Ofk4OWVXWV6gIgHHSGBOb0cEBf
zGTxhMyRdPUl7WHAn7KHWAEqhCGQlIp0QyyRiXjnNLmSmGYt/9yv3TrvmZE0xuJw
/jrq+H93AxTXXVzIjfpnziXMD5w3/Zt9+FPlyuNjyVh2Hnlf2CbwfSqsgsJETZOx
ML+CNsl/2CAXkJ1++CUQ94iC4plAPekVrpXAea4xqWqargD8Hcm0jqWuD9vns0ZA
VDJU669ocBlZRVCdZI6axGm4JAdtceQLLMMVZtzre8IAELB9JPiUC/C6g7e60Cg=
=oeV3
-END PGP SIGNATURE-

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Checkpatch Patches

2014-09-16 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/16/2014 02:36 PM, Kristofer Hallin wrote:
 On Tue, Sep 16, 2014 at 8:29 PM, Nick Krause xerofo...@gmail.com
 wrote:
 On Tue, Sep 16, 2014 at 1:39 PM,  valdis.kletni...@vt.edu
 wrote:
 On Tue, 16 Sep 2014 13:28:06 -0400, Rik van Riel said:
 -BEGIN PGP SIGNED MESSAGE-
 
 On 09/16/2014 01:12 PM, Nick Krause wrote:
 
 I am going to resend my patch and see if it's good and if
 not I am going to leave for a while.
 
 You may want to consider fixing them, by applying the advice 
 provided by many people, before resending them.
 
 That's just crazy talk.
 
 I am fixing them first and them sending them out. I am going to
 listen now and only do them correctly. Nick
 
 No, you won't.

Nick,

this is a chance for you to prove the nay-sayers wrong (or right).

When re-posting your patch, you can include information on what tips
you got on how to improve the patch, and how you applied that
information in the new version of the patch.

This is a good idea for anybody resubmitting a changed patch, because
it tells other reviewers what changes were made, why, and who pointed
out the idea for the change.

- -- 
All rights reversed.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUGIUeAAoJEM553pKExN6DEt8H/36FILPmG4wOK3TZFpQEVJHv
Lxq4DLq7GBUS37PhL/wjdYnLD4RJmOhpGk+FlZBhJ0StnCvS38Su7wwyZTzgCPIS
ir3EYOKhiFgEEuoB4iVaDc2FNv9jKKRVy/QK3jwkdt5oTBvr/I6YZzj2XAFJaUp9
0/RvdSNZU6kcvhTkd5xdDaaX1iOpxrggccRl+Pv2GBapeIEKvO6zk9U2GuLw+r6q
OLfJ5BElpEReoqFJNUXxzT+UyTmMel21REdfyu9UxAEONrQ2A3UHx/7upy71YpyR
a/IADIuBSXTdb31b+uuoFPfSUp4cs7WMyIDK2/tlL8wF28GLoL39X2xhWE3gkUU=
=7mL1
-END PGP SIGNATURE-

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


one thing at a time

2014-08-18 Thread Rik van Riel
On 08/18/2014 01:13 PM, Nick Krause wrote:
 Valdis,
 I was interested in both at the same time, just asked about Beagle-boards 
 first.
 I aren't having any difficulty with it , I just wanted to known more about 
 this
 area as the docs out there are terrible and not worth reading on this part of
 the networking stack.
Nick,

the Linux kernel requires a lot of focus.

I have no doubt that you are smart enough to learn
things about the Linux kernel, but nobody is smart
enough to learn everything at once. Nobody.

If you are serious about learning Linux kernel internals,
it would be good to focus on one thing at a time.

One thing. Learn everything about it, before moving on
to the next topic.

Kernel hacking is much more about attitude than about
aptitude. Focus is the key.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: HugePage by default

2014-07-30 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/30/2014 04:06 PM, Xin Tong wrote:
 I see 2 ways to do this.
 
 1. allocate 512 4KB contiguous pages everytime a handle_mm_fault is
 called and have the THP kernel thread to coalesce it to a huge 
 page. 2. modify the kernel (maybe extensively) to allocate 2MB
 page by default.
 
 I like 1. better because it requires less modifications. but it is 
 not as reliable. any suggestions

The kernel already does both of the above when
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y

- -- 
All rights reversed.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJT2cCrAAoJEM553pKExN6DAFEH/2K7GdK21t+sEB8rletBkyX7
88xGjdvmtFqN1eJI/kcoq+xDyTSfH0+/C/NoXggnxDNOw0yEmKo9rarFaazlaVXH
/pPS+jxkuislTsIzhLpLXJH0o8fi742ZCYU4OAXCJ4ZPiFxo0I8gJGWzsjvsbcqa
fY6eDAdB2Zn70ABHLlp5iiEbVGf32L5OnwrtXDZTJqlX2GNZxmtBlYn4dr7Pzfl/
eio6u9JXk98ECKKKoHme/PFVSrpjUiOB8gzMDocs1bAuVSJGD36htH3HyI27lM5V
ruSM9dvQZe0XupELT5Xvu1IP0lmAXacKu/FvAZbVg1+3m1nYjLqdd+vONMkOmCE=
=6i2v
-END PGP SIGNATURE-

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Memory allocation problems on RHEL 6.3 kernel version 2.6.32-279.el6.x86_64

2014-07-10 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/09/2014 08:23 AM, Amit Agarwal wrote:
 Hi All,
 
 We are running a 32 bit application on RHEL6.3-64 bit OS with
 kernel version 2.6.32-279.el6.x86_64.
 
 While running this application we see the following when running
 under strace: mmap(offset=33230848, len=2068480) failed with
 errno=12 for the file so file name
 
 The system has enough RAM, total 16GB and about 12 GB free.

The system may have enough memory, but your 32 bit application
is limited to slightly less than 4GB of virtual memory.

Errno 12 corresponds to -ENOMEM. The process running out of its
slightly-less-than-4GB of memory corresponds nicely with your
system still having 12GB of free memory.

This suggests you have run out of virtual memory space in the
process.

If your program needs more than 4GB of memory, eg. because you have
a large data set, you need to use a 64 bit version of the program.

This is not a kernel problem.

- -- 
All rights reversed.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTvi3EAAoJEM553pKExN6D1/QIAJ26mjn0UHz6MK1CPGywlvaZ
JuE+2JvHrImHALnQ8jxQOutNLWp9IPzB/zByoyMkqUiJkrQ15aj60pyzZ9PvzuQo
CX1ve3xMY/sf/617mRqRvbfCAbB3UArlXG4tU8OmzBdH4Qy/V6jFLY69hmFUqiXk
hMIkG7NhuptYSwPmHV7vw4qTFDVUhh/p+etPYDeuAtDcFlScZ8CjdX2pzwR8TxPr
M16UAOuhw2ONkZCO25XuM9AteKeLC85uV63gTgcm4h+W3Hqyeyebfsu7FmPkLq7v
JavXFNL9gCMeVxgvjU6A7o+NjT8HNgkh/IPdE2LrqFysE6SeU77T61AcJEMJulM=
=fmS4
-END PGP SIGNATURE-

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Why the page tables are needed for lowmem?

2014-06-19 Thread Rik van Riel
On 06/18/2014 11:21 PM, sandeep kumar wrote:
 Hi All
 
 i was going through mm initialization code, and saw paging_init()
 implementation.
 it has a function map_lowmem().
 
 I was wondering why do we need page table entries for lowmem ??
 
 because all the pages in lowmem can be addressed by kernel logical
 address and differ only an offset from the physical address. Why cant we
 simply add that offset to the virtual(logical) address and get the job
 done. Why waste some memory for creating PTEs for them?
 
 can any one clarify?

Because after switching the CPU to protected mode,
the CPU can only access memory through page tables,
and can no longer do loads, stores, etc to physical
memory addresses.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: GSOC proposal

2014-03-18 Thread Rik van Riel
On 03/17/2014 10:59 PM, sampriti neog wrote:
 To,
 The linux foundation
 I would like to participate in GOOGLE SUMMER OF CODE 2014 with your
 prestigious organization. I want to propose an idea regarding scanned
 files. My idea is to make a open source software that could scan a file
 directly into word document.

This does not appear to be related to the Linux kernel at all.

Also, this is not the contact address for GSOC kernel projects.

kind regards,

Rik van Riel
-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Regarding high mem

2012-10-17 Thread Rik van Riel
On 10/17/2012 04:52 AM, Kshemendra KP wrote:

 One thing not clear to me is, during boot,  kernel is copied to 1st MB
 of the RAM in x86 architecture as this  architecture
 has ISA mem map hole (640k -to 1MB). From 1st BM till 896MB is occupied
 by the kernel. Then user space will be
 made available beyond 896 MB.  With this reasoning, it is not clear to
 me, whether user space which is present
 beyond 896 MB is in high memory.

You appear to be confusing virtual and physical memory.

Physical addresses 0 through 896MB are mapped at
virtual addresses 3GB through 3GB+896MB.

The 128MB above that are used for vmalloc, and a
few other miscellaneous things.  This 1GB of
kernel virtual memory is the same in every process.

Virtual addresses 0-3GB are used for userspace,
which each process getting its own private 3GB
sized virtual memory area.

Ranges of process virtual memory can be used,
or unused. The used ranges could be backed by
any physical memory in the system (highmem, normal 
dma zones), or not by any memory at all (backed by
swap, or on-disk file pages).

Does that make sense?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Does Linux process exist information leakage?

2012-01-19 Thread Rik van Riel
On 01/11/2012 01:44 PM, Greg Freemyer wrote:

 When a linux process dies, it first becomes a zombie and the parent process 
 is signaled.

 The parent process at that point can still do various things.  If the parent 
 is a debugger, it can get all sorts of details from the zombie.

 When the parent acknowledges the death of child signal, the zombie is really 
 killed and removed from the system tables, etc.

The memory of a process is freed before it becomes a zombie.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Gmail complaining about authenticity of emails sent/received via kernelnewbies

2011-06-29 Thread Rik van Riel
On 06/29/2011 10:28 AM, Prashant Shah wrote:
 On Wed, Jun 29, 2011 at 6:15 PM, Rik van Rielr...@surriel.com  wrote:

 Did Gmail make changes perhaps?


 just a wild guess. maybe something related to SPF

 http://mail.google.com/support/bin/answer.py?hl=enctx=mailanswer=185812

 I know that the message was really sent by the sender. What can I do?
 Many small senders don't follow good sending practices and do not
 provide authentication information. This can lead to incoming emails
 being misclassified as spam, and it can also attract spammers who use
 the sender's name to send out spam.

 We recommend contacting the sender of the email and encouraging them
 to authenticate their messages by publishing a SPF record.

 SPF records should also be published in DNS as type SPF records.

You've got to be kidding me.

SPF is fundamentally flawed in so many ways, noone should
be recommending it in this day and age.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Gmail complaining about authenticity of emails sent/received via kernelnewbies

2011-06-29 Thread Rik van Riel
On 06/29/2011 01:19 PM, Mulyadi Santosa wrote:
 Hi Rik...

 Long time no chat :)

 On Wed, Jun 29, 2011 at 21:37, Rik van Rielr...@surriel.com  wrote:
 You've got to be kidding me.

 SPF is fundamentally flawed in so many ways, noone should
 be recommending it in this day and age.

 So, what do you recommend about this issue? Should we just bear with it?

At some point I will upgrade kernelnewbies.org to a RHEL 6
virtual machine, with newer versions of everything.

Right now I am very busy with other things though, so it'll
be a few months before I get around to it...

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: academia contribution to the kernel

2011-05-31 Thread Rik van Riel
On 05/31/2011 05:45 AM, Pierre Vorhagen wrote:

 But I really wonder which type of Master (if any?) would maximize my
 chances of being hired by a company working on kernel development and
 related matters. Surely, a MSc in Computer Engineering would be more
 on-topic than a traditional MSc in Computer Science for instance, no?
 What *is* the best way to go about a Master that would be related to
 Linux development as much as possible?

Companies won't care much about your master.

However, if you manage to take your code from a proof of
concept to something production ready and merged in the
Linux kernel, you have just shown the whole world that you
are a kernel developer.

That is the kind of thing that will get you hired.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: [virtual memory] page_table_lock mmap_sem

2011-03-31 Thread Rik van Riel
On 03/29/2011 06:30 PM, Venkatram Tummala wrote:
 Hi,

 Why do we need both page_table_lock  mmap_sem in the kernel. Why isn't
 mmap_sem good enough for serialization. As far as i see it, all attempts
 to change the page table hierarchy in the kernel is done after holding
 the write lock on mmap_sem. As we are already holding the write lock, we
 do we need an extra page_table_lock (spinlock) ? Are there any code
 paths in the kernel which attempt to modify the page table hierarchy
 without holding the write lock on mmap_sem ?

Yes, there are.

Look at the page fault code, which takes a read lock
on mmap_sem.

This allows multiple threads in a multi-threaded process
to handle page faults simultaneously.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: please unsubscribe

2011-01-09 Thread Rik van Riel
On 01/09/2011 05:31 PM, gnulinux54 wrote:
 please  unsubscribe

Done.

 don't remember password

I have enabled the monthly password reminder for this list
to help others in the future.

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Linux - Getting your Hands Wet Dirty

2011-01-06 Thread Rik van Riel
On 01/05/2011 01:32 PM, Sakshi Malhotra wrote:

 I want to land up with a job in Linux Kernel but everywhere I get
 rejected for lack of practical experience.
 Dont know what to do to get relevant practical experince which gets
 counted and helps me land up with a job.
 I am low on morale and confidence...pls suggest.

It's near the top of the kernelnewbies FAQ:

http://kernelnewbies.org/CareerAdvice

-- 
All rights reversed.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies