public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 3.6-rc7 32-bit PAE miscalculates dirty page limits
@ 2012-09-30  9:38 Pierre Beck
  2012-09-30 18:52 ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Beck @ 2012-09-30  9:38 UTC (permalink / raw)
  To: linux-kernel

Hi,

there seems to be a bug in either ext4 or VM code triggered with 16 GB 
memory when compiled with 32-bit and PAE. dirty_background_ratio 
defaults to 10, dirty_ratio to 20. But in effect, dirty pages are 
strongly limited (zero or negative?). I observed extreme I/O wait states 
and slow disk access. A quick cure was to set dirty_bytes and 
dirty_background_bytes to sane values, overriding the ratios. An 
educated guess: the result of dirty_ratio calculation is stored as an 
unsigned 32-bit integer and overflows?

Greetings,

Pierre Beck

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 3.6-rc7 32-bit PAE miscalculates dirty page limits
  2012-09-30  9:38 3.6-rc7 32-bit PAE miscalculates dirty page limits Pierre Beck
@ 2012-09-30 18:52 ` H. Peter Anvin
  2012-10-01 21:10   ` Pierre Beck
  0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2012-09-30 18:52 UTC (permalink / raw)
  To: Pierre Beck; +Cc: linux-kernel

On 09/30/2012 02:38 AM, Pierre Beck wrote:
> Hi,
>
> there seems to be a bug in either ext4 or VM code triggered with 16 GB
> memory when compiled with 32-bit and PAE. dirty_background_ratio
> defaults to 10, dirty_ratio to 20. But in effect, dirty pages are
> strongly limited (zero or negative?). I observed extreme I/O wait states
> and slow disk access. A quick cure was to set dirty_bytes and
> dirty_background_bytes to sane values, overriding the ratios. An
> educated guess: the result of dirty_ratio calculation is stored as an
> unsigned 32-bit integer and overflows?
>

Seriously, why are you running a 32-bit kernel on memory sizes this 
large?  Yes, in theory it should work up to 64 GB but claims are that 
the kernel doesn't even boot if you try...

	-hpa
-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 3.6-rc7 32-bit PAE miscalculates dirty page limits
  2012-09-30 18:52 ` H. Peter Anvin
@ 2012-10-01 21:10   ` Pierre Beck
  2012-10-01 21:52     ` Borislav Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Beck @ 2012-10-01 21:10 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kernel

Hi,

when I installed the original setup, there were no 64-bit PC CPUs. It's 
been kept up-to-date, changed hardware whenever necessary. But a shift 
from 32-bit to 64-bit isn't as simple as it seems.

I tried 64-bit kernel with 32-bit userspace. It failed. The installed 
DVB-S tuner driver messed up the stream. I *guess* there's some little / 
big endian issue between userspace program (vdr, dvbhddevice) and driver 
(sff716x_ff which is still in experimental media stack), and it *may* be 
resolved by upgrading userspace to 64-bit as well.

I do consider the option of upgrading to 64-bit userspace. My 
distribution Debian doesn't provide a clean way to do so in-place, 
though. There are HOWTOs on the topic with warnings varying between 'do 
not attempt, will eat your data' and 'worked for the author, YMMV'. That 
scared me off for now. Instead, a clean install and copying /etc will be 
my best option and with LVM in place I'm sure I will eventually upgrade 
sooner or later.

Personally, I don't need a fix anyways, since I found the stated 
workaround and can live with that. But what about other folks who 
upgrade their PC? They won't know what hit them when their new PC crawls 
because disk is trashed.

Greetings,

Pierre Beck

On 30.09.2012 20:52, H. Peter Anvin wrote:
> On 09/30/2012 02:38 AM, Pierre Beck wrote:
>> Hi,
>>
>> there seems to be a bug in either ext4 or VM code triggered with 16 GB
>> memory when compiled with 32-bit and PAE. dirty_background_ratio
>> defaults to 10, dirty_ratio to 20. But in effect, dirty pages are
>> strongly limited (zero or negative?). I observed extreme I/O wait states
>> and slow disk access. A quick cure was to set dirty_bytes and
>> dirty_background_bytes to sane values, overriding the ratios. An
>> educated guess: the result of dirty_ratio calculation is stored as an
>> unsigned 32-bit integer and overflows?
>>
>
> Seriously, why are you running a 32-bit kernel on memory sizes this 
> large?  Yes, in theory it should work up to 64 GB but claims are that 
> the kernel doesn't even boot if you try...
>
>     -hpa


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 3.6-rc7 32-bit PAE miscalculates dirty page limits
  2012-10-01 21:10   ` Pierre Beck
@ 2012-10-01 21:52     ` Borislav Petkov
  2012-10-01 21:53       ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: Borislav Petkov @ 2012-10-01 21:52 UTC (permalink / raw)
  To: Pierre Beck; +Cc: H. Peter Anvin, linux-kernel

On Mon, Oct 01, 2012 at 11:10:47PM +0200, Pierre Beck wrote:
> But what about other folks who upgrade their PC? They won't know what
> hit them when their new PC crawls because disk is trashed.

I don't know, maybe backup their data, install a nice 64-bit Linux
distro of their liking along with a 64-bit kernel which is several
magnitudes more tested than its 32-bit counterpart, copy their data back
and forget 32-bit ever existed...

:-)

-- 
Regards/Gruss,
    Boris.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 3.6-rc7 32-bit PAE miscalculates dirty page limits
  2012-10-01 21:52     ` Borislav Petkov
@ 2012-10-01 21:53       ` H. Peter Anvin
  2012-10-01 21:59         ` Borislav Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2012-10-01 21:53 UTC (permalink / raw)
  To: Borislav Petkov, Pierre Beck, linux-kernel

On 10/01/2012 02:52 PM, Borislav Petkov wrote:
> On Mon, Oct 01, 2012 at 11:10:47PM +0200, Pierre Beck wrote:
>> But what about other folks who upgrade their PC? They won't know what
>> hit them when their new PC crawls because disk is trashed.
> 
> I don't know, maybe backup their data, install a nice 64-bit Linux
> distro of their liking along with a 64-bit kernel which is several
> magnitudes more tested than its 32-bit counterpart, copy their data back
> and forget 32-bit ever existed...
> 

It is very sad, though, that there are still drivers which don't work
correctly in compat mode.  Please report bugs on those -- that is just
not acceptable.

Unfortunately few distros provide 64-bit kernels for their 32-bit
distros, which acerbates the problem.

	-hpa


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 3.6-rc7 32-bit PAE miscalculates dirty page limits
  2012-10-01 21:53       ` H. Peter Anvin
@ 2012-10-01 21:59         ` Borislav Petkov
  2012-10-01 22:00           ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: Borislav Petkov @ 2012-10-01 21:59 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Pierre Beck, linux-kernel

On Mon, Oct 01, 2012 at 02:53:40PM -0700, H. Peter Anvin wrote:
> It is very sad, though, that there are still drivers which don't work
> correctly in compat mode. Please report bugs on those -- that is just
> not acceptable.
>
> Unfortunately few distros provide 64-bit kernels for their 32-bit
> distros, which acerbates the problem.

Yes, the other way 'round, 32-bit userspace on 64-bit kernels should
work. And fixed if not.

Thanks.

-- 
Regards/Gruss,
    Boris.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 3.6-rc7 32-bit PAE miscalculates dirty page limits
  2012-10-01 21:59         ` Borislav Petkov
@ 2012-10-01 22:00           ` H. Peter Anvin
  0 siblings, 0 replies; 7+ messages in thread
From: H. Peter Anvin @ 2012-10-01 22:00 UTC (permalink / raw)
  To: Borislav Petkov, Pierre Beck, linux-kernel

On 10/01/2012 02:59 PM, Borislav Petkov wrote:
> On Mon, Oct 01, 2012 at 02:53:40PM -0700, H. Peter Anvin wrote:
>> It is very sad, though, that there are still drivers which don't work
>> correctly in compat mode. Please report bugs on those -- that is just
>> not acceptable.
>>
>> Unfortunately few distros provide 64-bit kernels for their 32-bit
>> distros, which acerbates the problem.
> 
> Yes, the other way 'round, 32-bit userspace on 64-bit kernels should
> work. And fixed if not.
> 

That is the same way around (32-bit kernel, 64-bit userspace obviously
is a nonstarter.)

	-hpa


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-01 22:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30  9:38 3.6-rc7 32-bit PAE miscalculates dirty page limits Pierre Beck
2012-09-30 18:52 ` H. Peter Anvin
2012-10-01 21:10   ` Pierre Beck
2012-10-01 21:52     ` Borislav Petkov
2012-10-01 21:53       ` H. Peter Anvin
2012-10-01 21:59         ` Borislav Petkov
2012-10-01 22:00           ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox