lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <471C6FA8.30500@yandex.ru>
Date:	Mon, 22 Oct 2007 12:38:48 +0300
From:	Artem Bityutskiy <dedekind@...dex.ru>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: forcing write-back from FS - again

Andrew Morton wrote:
>> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
>> @@ -28,6 +28,7 @@ static inline int task_is_pdflush(struct task_struct *task)
>>    */
>>   enum writeback_sync_modes {
>>          WB_SYNC_NONE,   /* Don't wait on anything */
>> +       WB_SYNC_NONE_PG,/* Don't wait on anything, don't touch locked pages */
>>          WB_SYNC_ALL,    /* Wait on every mapping */
>>          WB_SYNC_HOLD,   /* Hold the inode on sb_dirty for sys_sync() */
>>   };
> 
> It would be simpler/safer/saner to add a new bitflag to writeback_control
> and use that directly.  The WB_SYNC_foo flags are a holdover from an
> earlier time and really should be made to go away, in favour of directly
> setting up an appropriate writeback_control.

You mean something like (wbc->flags & WB_SYNC_NONE) etc? But below you used 
wbc->skip_locked_pages, I'm confused.

> The code you have there looks racy: if someone else locks the page in that
> little window after the PageLocked() test we'll still block in lock_page().
>  That's unlikely to happen in your application (apart from a remaining
> ab/ba scenario) but we should make it robust:
> 
> 	if (wbc->skip_locked_pages) {
> 		if (TestSetPageLocked(page))
> 			continue;
> 	} else {
> 		lock_page(page);
> 	}

Yeah, thanks for the pointer! Thank you for your help on the issue!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ